For the complete documentation index, see llms.txt. This page is also available as Markdown.

placekey

Placekey is a free and open universal standard identifier for any physical place, so that the data pertaining to those places can be shared across organizations easily. Since Placekey is based on H3, here we offer a way to transform to and from that index and delegate any extra functionality to H3 itself.

You can learn more about Placekey on their website or in the Spatial Indexes section of this documentation.

PLACEKEY_FROMH3

PLACEKEY_FROMH3(h3index)

Description

Returns the placekey equivalent of the given H3 index.

Input parameters

  • h3index: STRING H3 identifier.

Return type

STRING

Example

SELECT `carto-un`.carto.PLACEKEY_FROMH3('84390cbffffffff');
-- @7dd-dc3-52k
SELECT `carto-un-eu`.carto.PLACEKEY_FROMH3('84390cbffffffff');
-- @7dd-dc3-52k
SELECT carto.PLACEKEY_FROMH3('84390cbffffffff');
-- @7dd-dc3-52k

PLACEKEY_ISVALID

PLACEKEY_ISVALID(placekey)

Description

Returns a boolean value true when the given string represents a valid Placekey, false otherwise.

Input parameters

  • placekey: STRING Placekey identifier.

Return type

BOOL

Examples

PLACEKEY_TOH3

Description

Returns the H3 index equivalent of the given placekey.

Input parameters

  • placekey: STRING Placekey identifier.

Return type

STRING

Example

EU flagThis project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 960401.

Last updated

Was this helpful?