Closed spatialhast closed 9 years ago
PostGIS stores the geometry in ewkb format. You can use ST_AsBinary to get wkb out of it.
Thanks! Initially I use https://github.com/tobinbradley/dirt-simple-postgis-http-api to publish data from PostGIS DB in JSON format and there data in geometry field is in WKB format. Using wkx plugin I want convert in GeoJSON format. I change SQL query in from dirt-simple-postgis-http-api plugin to receive GeoJSON format.
@cschwarz is a conversion from EWKB something you've attempted? Or is it not possible?
I store coordinates in wkb format (data get from PostGIS DB, geometry Field the_geom geometry(Geometry,4326)). Example http://spatialhast.github.io/index.wkb.to.geojson.html. In ' var the_geom' - wkb data of polygonal geometry. In geometryType of wkx.js I receive wrong number of geometry type (536870915). In 'var geojson' - example of GeoJSON data which need receive wrom wkb data. Possible convert wkb in GeoJSON data (to display on map via Leaflet.js)?