WFS to PostGIS in 1 Step
This is an update to my previous post “WFS to PostGIS in 3 Steps”. Thanks to Even Rouault’s comments and improvements to GDAL, it is now possible to load Latin1-encoded WFS (like the one by data.wien.gv.at) into PostGIS in just one simple step.
To use the following instructions, you’ll have to get the latest GDAL (release-1600-gdal-mapserver.zip)
You only need to run SDKShell.bat to set up the environment and ogr2ogr is ready for action:
C:\Users\Anita>cd C:\release-1600-gdal-mapserver C:\release-1600-gdal-mapserver>SDKShell.bat C:\release-1600-gdal-mapserver>ogr2ogr -overwrite -f PostgreSQL PG:"user=myuser password=mypassword dbname=wien_ogd" "WFS:http://data.wien.gv.at/daten/geoserver/ows?service=WFS&request=GetFeature&version=1.1.0&typeName=ogdwien:BEZIRKSGRENZEOGD&srsName=EPSG:4326"
Thanks everyone for your comments and help!