[gdal-dev] org2org
Andrew C Aitchison
andrew at aitchison.me.uk
Sun Nov 13 06:08:59 PST 2022
On Wed, 9 Nov 2022, Leber, Thorsten wrote:
> Hi All,
> I am trying to use org2org with the following command:
>
> ogr2ogr -f "ESRI Shapefile" C:\RenderTest\raster_clipper_and.shp PG:"host=10.49.20.42 port=5432 user=tilemill password=test dbname=nextgen" -sql "SELECT "name", "left", top, "right", bottom FROM grids.grid_1_25grad WHERE ST_Intersects(geom, (SELECT geom FROM countries.geometries_boundary_buffer_10km('and'))) AND NOT ST_Touches(geom, (SELECT geom FROM countries.geometries_boundary_buffer_10km('and')))" -s_srs EPSG:4326 -t_srs EPSG:4326 -overwrite -lco ENCODING=utf8
Are the quotes in
SELECT "name", "left", top, "right", bottom FROM
significant ? top and bottom are not quoted, but the other 3 out of 5 are.
> I expect in the output folder 5 files
>
> [cid:image001.png at 01D8F432.E187B8A0]
>
> But I receive a warning:
>
> Warning 1: layer names ignored in combination with -sql.
>
> And get only 3 files
>
> [cid:image002.png at 01D8F433.27BC9750]
>
> I am missing the .shp and the .shx file. Is there something wrong in my command?
--
Andrew C. Aitchison Kendal, UK
andrew at aitchison.me.uk
More information about the gdal-dev
mailing list