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

1.6 KiB

title description menu weight flux/v0/tags introduced
geo.s2CellLatLon() function `geo.s2CellLatLon()` returns the latitude and longitude of the center of an S2 cell.
flux_v0_ref
name parent identifier
geo.s2CellLatLon experimental/geo experimental/geo/s2CellLatLon
201
geotemporal
0.78.0

geo.s2CellLatLon() returns the latitude and longitude of the center of an S2 cell.

Function type signature
(token: string) => {lon: float, lat: float}

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

Parameters

token

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

Examples

Return the center coordinates of an S2 cell

import "experimental/geo"

geo.s2CellLatLon(token: "89c284")// Returns {lat: 40.812535546624574, lon: -73.55941282728273}