benrei / wkt Goto Github PK
View Code? Open in Web Editor NEWParse WKT (Well-known text) into GeoJSON or stringify GeoJSON into WKT
License: MIT License
Parse WKT (Well-known text) into GeoJSON or stringify GeoJSON into WKT
License: MIT License
I have the following geometry:
{"type":"Polygon","coordinates":[[[13.56672907,52.649024203],[13.566891175,52.649720812],[13.566959967,52.649817764],[13.567228108,52.649817411],[13.567079614,52.649539834],[13.566808936,52.648423511],[13.56672907,52.649024203]]]}
and would like to convert it to WKT like this:
const geometryWkt = wkt.stringify(geometry)
but I get:
Error: stringify requires a valid GeoJSON Feature or geometry object as input
What am I doing wrong?
in geojson,the Coordinate reference systems is force to urn:ogc:def:crs:OGC::CRS84
。its xy order is lon/lat。
in wkt, its CRS is not defined ,its CRS need to be define when use it。in mysql or postgis,it's define by the table column,general its define as epsg:4326,its xy order is lat/lon。
so in frontend,We need to provide an argument that specifies either the SRID or the order of the xy axis of the source
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.