sepal_ui.scripts.utils.geojson_to_ee#

sepal_ui.scripts.utils.geojson_to_ee(geo_json, geodesic=False, encoding='utf-8')[source]#

Transform a geojson object into a featureCollection or a Geometry.

No sanity check is performed on the initial geo_json. It must respect the __geo_interface__.

Parameters:
  • geo_json (dict) – a geo_json dictionary

  • geodesic (bool) – Whether line segments should be interpreted as spherical geodesics. If false, indicates that line segments should be interpreted as planar lines in the specified CRS. If absent, defaults to True if the CRS is geographic (including the default EPSG:4326), or to False if the CRS is projected. Defaults to False.

  • encoding (str) – The encoding of characters. Defaults to “utf-8”.

Returns:

the created featurecollection

Return type:

FeatureCollection

New in version 2.8.0.