spatial
spatial copied to clipboard
Add a spatial function to convert WKT to Geo-JSON
This PR adds a new spatial function spatial.convert.wktToGeoJson
to convert WKT to Geo-JSON.
return spatial.convert.wktToGeoJson("MULTIPOLYGON(((15.3 60.2, 15.3 60.4, 15.7 60.4, 15.7 60.2, 15.3 60.2)))") as json
returns an object like
{
"type": "MultiPolygon",
"coordinates", [[[
[15.3, 60.2],
[15.3, 60.4],
[15.7, 60.4],
[15.7, 60.2],
[15.3, 60.2]
]]]