bcgov / designatedlands

Python script to combine conservation related spatial data from many sources to create a single 'Designated Lands' layer for British Columbia
Apache License 2.0
9 stars 4 forks source link

dump to shape doesn't work on windows #20

Closed smnorris closed 7 years ago

smnorris commented 7 years ago

python conservationlands.py dump doesn’t work. I get this error:

ERROR 1: ERROR: column "category" does not exist LINE 1: SELECT category, rollup, geom ^

But running this on the command line works just fine (and pretty fast!):

ogr2ogr -t_srs EPSG:3005 -lco OVERWRITE=YES conservation_lands.shp PG:"host=localhost user=postgres dbname=postgis password=postgres" -sql "SELECT category, rollup, geom FROM conservation_lands.conservation_lands"

And I verified in a python session that that is the string being generated, so I don’t really know what’s up there.

smnorris commented 7 years ago

dump to .gdb instead