Created
August 24, 2022 17:30
-
-
Save tmcw/19ce9832980fc21567369dfa000151b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { wktToGeoJSON, geoJSONToWkt } from "betterknown"; | |
import proj4 from "proj4"; | |
// Converting & reprojecting an EWKT string | |
wktToGeoJSON(`SRID=3857;POINT(-400004.3 60000.1)`, { | |
proj: proj4, | |
}); | |
// Converting GeoJSON to WKT | |
geoJSONToWkt({ | |
type: 'Point', | |
coordinates: [1, 2] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment