docs-v2/content/flux/v0/stdlib/experimental/geo/getlevel.md

1.4 KiB

title description menu weight flux/v0/tags
geo.getLevel() function `geo.getLevel()` returns the S2 cell level of specified cell ID token.
flux_v0_ref
name parent identifier
geo.getLevel experimental/geo experimental/geo/getLevel
201
geotemporal

geo.getLevel() returns the S2 cell level of specified cell ID token.

Function type signature
(token: string) => int

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Parameters

token

({{< req >}}) S2 cell ID token.

Examples

Return the S2 cell level of an S2 cell ID token

import "experimental/geo"

geo.getLevel(token: "166b59")// Returns 10