Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to convert wkt to geojson? #2057

Closed
liucaidong opened this issue Mar 16, 2021 · 3 comments
Closed

how to convert wkt to geojson? #2057

liucaidong opened this issue Mar 16, 2021 · 3 comments

Comments

@liucaidong
Copy link

the latest version of turf, could we consider this utility to be added to our lib?

@chrispahm
Copy link
Contributor

Hey @liucaidong,

in case you're just looking for a library capable of converting WKT to GeoJSON, there are a few options available:

  • wellknown, released by Mapbox (the company behind the first versions of turf.js)
  • wicket

Here's a small notebook demonstrating how to use the wellknown library:
https://observablehq.com/@chrispahm/parse-well-known-text-wkt-into-geojson

With regards to your request adding this feature to turf: To the best of my knowledge, converting between geometry formats is generally not in the scope of the turf.js library. Therefore I'd propose that you just import any of the above libraries into your project in addition to turf.
Does this answer your question?

@rowanwins
Copy link
Member

Hi @liucaidong

As @chrispahm says there are plenty of other libs out there for doing this. Turf is not a library for conversion of data formats so we're not looking at adding functionality along those lines.

Thanks

@liucaidong
Copy link
Author

@chrispahm @rowanwins Thanks a lot, you guys really did me a big favor!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants