mapbox / turf-swift

A Swift language port of Turf.js.
https://mapbox.github.io/turf-swift/
ISC License
235 stars 55 forks source link

Convert between GeoJSON and WKT #185

Open 1ec5 opened 2 years ago

1ec5 commented 2 years ago

This library’s GeoJSON types should have initializers that take WKT-formatted strings and properties that return WKT-formatted strings. This format is more compact than GeoJSON but more expressive than the Encoded Polyline format, supporting the full Simple Features specification, making it ideal for URL query parameters.

The Turf.js project declined to support WKT conversion in Turfjs/turf#2057. However, this library has a slightly different scope, given that it defines its own types for in-memory representations of GeoJSON, something the JavaScript library inherently has no need for. The WKT format isn’t terribly complex, but we can port the wellknown library as a starting point.

/cc @Guardiola31337

Guardiola31337 commented 2 years ago

cc @VysotskiVadim for visibility