Loading

->GEOJSON

geo

The ->GEOJSON function translate the given GeoShape into a GeoJSON.

The resulting GeoJSON is a string representing a MultiPolygon geometry. By default, it defines the boundaries of the covered areas and any holes it these areas, if any.

It is also possible for this function to return a GeoJSON representing all the cells in the GeoShape.

GeoJson could be visualized on the map, if you let a special object on the map. See example.

->GEOJSON is available since version 2.4.1.

See also

Signatures

Examples

// Outputs the GeoJSON covering the GeoShape 'MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))' 10 false GEO.WKT ->GEOJSON JSON-> 'geojson' STORE // the map web component in vscode or warp studio will parse // this special object and draw the geoshapes { 'data' [ $geojson ] }
// Same thing but outputs all cells 'MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))' 10 false GEO.WKT true ->GEOJSON JSON-> 'geojson' STORE // the map web component in vscode or warp studio will parse // this special object and draw the geoshapes { 'data' [ $geojson ] }