2

I am exporting some tables from PostGIS to a geopackage. My command to do is task is as follows

ogr2ogr -append -f GPKG E:\workspace\test.gpkg PG:service=XXXX -where app_einzugsgebiet.hauptgemeinde=70346  app_einzugsgebiet -nln Einzugsgebiet -nlt MULTIPOLYGON -lco GEOMETRY_NAME=shape -a_srs EPSG:31287

Now, I would like to use the WHERE IN clause in my command. However, I could not figure out how. I tried the following command

ogr2ogr -append -f GPKG E:\workspace\test.gpkg PG:service=XXXX -where app_einzugsgebiet.hauptgemeinde IN (70319, 70101, 70346) app_einzugsgebiet -nln Einzugsgebiet -nlt MULTIPOLYGON -lco GEOMETRY_NAME=shape -a_srs EPSG:31287

I am getting an error that says ERROR 1: Couldn't fetch requested layer 'IN'!. I tried with square bracket but it did not help either. Obviously, my syntax is not okay. So how do I do that?

Nil
  • 1,517
  • 8
  • 22

0 Answers0