Here is a simple conversion tool between different text representations for 2D geometry objects.
Supported formats are:
- WKB, a.k.a. Well-Known Binary, in hexadecimal format
- WKT, a.k.a. Well-Known Text
- GeoJSON
A few sample geometries (taken from Wikipedia) are available:
- POINT
- LINESTRING
- POLYGON
- MULTIPOINT
- MULTILINESTRING
- MULTIPOLYGON
- GEOMETRYCOLLECTION
This tool uses the wkx javascript library for parsing.
Have fun!
Wow this is awesome. Do you have the source code for this anywhere? You should make this into a python package if you haven’t yet already.
Haven’t thought of it… this program is kind of a draft, so it would need some rework to become a package. Feel free to do so though, I would be happy to contribute!