Last active
December 28, 2022 14:59
-
-
Save thbaumann/f426bfec12e8ae67222d10fde957b9e4 to your computer and use it in GitHub Desktop.
download wfs to shapefile or gepacke with ogr2ogr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set OSGEO4W_ROOT=C:\OSGeo4W64 | |
set basis_url="https://www.geodatenportal.sachsen-anhalt.de/gfds/ws/wfs/942f5d74-6c2b-263a/GDI-LSA_Schutzgebiete/ows.wfs?REQUEST=GetCapabilities&SERVICE=WFS" | |
set layer="sg:lau_br_lsa" | |
call "%OSGEO4W_ROOT%\bin\o4w_env.bat" | |
echo Layer wird importiert... | |
rem Kommentar: ogr2ogr.exe anstelle nur ogr2ogr falls probleme auftauchen... | |
rem Layerliste abrufen | |
rem ogrinfo --config GDAL_HTTP_UNSAFESSL YES -ro -so WFS:"https://www.geodatenportal.sachsen-anhalt.de/gfds/ws/wfs/942f5d74-6c2b-263a/GDI-LSA_Schutzgebiete/ows.wfs?REQUEST=GetCapabilities&SERVICE=WFS" | |
rem wfs zu shapefile | |
rem ogr2ogr -skipfailures wfs_layer.shp --config GDAL_HTTP_UNSAFESSL YES WFS:"https://www.geodatenportal.sachsen-anhalt.de/gfds/ws/wfs/942f5d74-6c2b-263a/GDI-LSA_Schutzgebiete/ows.wfs?REQUEST=GetCapabilities&SERVICE=WFS" sg:lau_br_lsa" | |
rem wfs zu geopackage unter nutzung von variablen | |
ogr2ogr -skipfailures -f gpkg wfs_download2.gpkg --config GDAL_HTTP_UNSAFESSL YES WFS:%basis_url% %layer% | |
echo Layer fertig importiert | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment