Skip to main content
This method is not recommended. Please use Sedona GeoJSON data source to write GeoJSON files. Return the GeoJSON string representation of a geometry The type parameter (Since: v1.6.1) takes the following options -
  • “Simple” (default): Returns a simple GeoJSON geometry.
  • “Feature”: Wraps the geometry in a GeoJSON Feature.
  • “FeatureCollection”: Wraps the Feature in a GeoJSON FeatureCollection.

Signatures

Parameters

A
Geometry
required
The input geometry.
type
String
The output type.

Return type

A string representation.

Examples

Simple GeoJSON

Feature GeoJSON

FeatureCollection GeoJSON