I want to use ST_GeomFromText()
to load vector data to PostGIS. However, I don't know how to convert from Geojson type to WKT.
N.B. I know I can use OGR2OGR to upload the GeoJSON directly, but I just want to confirm if there is any way to convert it or not.
Best Answer
why not use
see Creating GeoJSON Feature Collections with JSON and PostGIS functions or ST_GeomFromGeoJSON from OpenGeo.
To convert to WKT, use