Created
November 29, 2014 16:54
-
-
Save wilhelmberg/ab713b256df39dd29b19 to your computer and use it in GitHub Desktop.
Convert Western Europe ISO-8859-1 1252 shapefiles to utf-8
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 | |
CALL "C:\Program Files\QGIS Brighton\OSGeo4W.bat" | |
::http://ss64.com/nt/syntax-args.html | |
::d=drive | |
::p=path | |
::n=name without extension | |
for /R %%f in (*.shp) do ( | |
ECHO %%f | |
::probieren, ob's ohne --config auch funkt | |
ogr2ogr %%~dpnf-ORIG.shp %%f --config SHAPE_ENCODING "ISO-8859-1" | |
ogrinfo %%f -sql "DROP TABLE %%~nf" | |
:: del | |
:: ogr2ogr %%f %%~dpnf-ORIG.shp -lco ENCODING=UTF-8 --config SHAPE_ENCODING "ISO-8859-1" | |
::Gleich transformieren | |
ogr2ogr %%f %%~dpnf-ORIG.shp -lco ENCODING=UTF-8 -overwrite | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment