I tried to export a shapefile from my PostGIS installation using pgsql2shp as follow
pgsql2shp -f tiles.shp -h -u -P "SELECT id, the_geom FROM WHERE ST_GeomFromGeoJSON('{ "type": "Polygon", "coordinates": [ [ [ -92.472398018272358, 18.086381878379395 ], [ -92.472398018272358, 21.705890714546868 ], [ -86.679183238981381, 21.705890714546868 ], [ -86.679183238981381, 18.086381878379395 ], [ -92.472398018272358, 18.086381878379395 ] ] ] }') && the_geom;"and the command gives the error
Error executing user query: ERROR: quoted object property name expected (at offset 2)I suppose is a problem related with the GeoJSON query because when I run
pgsql2shp -f tiles.shp -h -u -P "SELECT id, the_geom FROM WHERE id = 1;"the shapefile is generated without error.
أكثر...
pgsql2shp -f tiles.shp -h -u -P "SELECT id, the_geom FROM WHERE ST_GeomFromGeoJSON('{ "type": "Polygon", "coordinates": [ [ [ -92.472398018272358, 18.086381878379395 ], [ -92.472398018272358, 21.705890714546868 ], [ -86.679183238981381, 21.705890714546868 ], [ -86.679183238981381, 18.086381878379395 ], [ -92.472398018272358, 18.086381878379395 ] ] ] }') && the_geom;"and the command gives the error
Error executing user query: ERROR: quoted object property name expected (at offset 2)I suppose is a problem related with the GeoJSON query because when I run
pgsql2shp -f tiles.shp -h -u -P "SELECT id, the_geom FROM WHERE id = 1;"the shapefile is generated without error.
أكثر...