$ ogr2ogr -f "GeoJSON" test.geojson -t_srs EPSG:4326 PG:"host=localhost user=postgres dbname=sp_join port=5432" -sql 'select gid, geom from test'
I am using the following code in ogr2ogr
to export a table from PostGIS to GeoJSON, but get the following errors:
ERROR 1: Reading EWKB with 4-dimensional coordinates (XYZM) is not supported
ERROR 1: Reading EWKB with 4-dimensional coordinates (XYZM) is not supported
ERROR 1: Reading EWKB with 4-dimensional coordinates (XYZM) is not supported
ERROR 1: Reading EWKB with 4-dimensional coordinates (XYZM) is not supported
ERROR 1: Reading EWKB with 4-dimensional coordinates (XYZM) is not supported
ERROR 1: Reading EWKB with 4-dimensional coordinates (XYZM) is not supported
How can I avoid 4-dimensional coordinates?
Answer
You can remove unwanted ordinates with any of:
So you could modify your -sql
argument like this:
-sql 'select gid, st_force2d(geom) from test'
No comments:
Post a Comment