Last active
December 14, 2015 16:29
-
-
Save jlehtoma/5115892 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# KML-filun määrityksen mukaan enkoodaus on UTF-8 | |
> head -n 1 Kuntarajat\ 2011\ \&\ 2012\ .kml | |
<?xml version='1.0' encoding='UTF-8'?> | |
# Fileen oikea enkoodaus on kuitenkin iso-8859-1 | |
> file -bi Kuntarajat\ 2011\ \&\ 2012\ .kml | |
application/xml; charset=iso-8859-1 | |
# Muutetaan enkoodaus iso-8859-1 -> UTF-8 | |
> iconv -f iso-8859-1 -t utf8 Kuntarajat\ 2011\ \&\ 2012\ .kml > Kuntarajat_2011_2012_utf8.kml | |
> file -bi Kuntarajat_2011_2012_utf8.kml | |
application/xml; charset=utf-8 | |
# Muutetaan GeoJSONiksi | |
ogr2ogr -f "GeoJSON" Kuntarajat_2011_2012.geojson Kuntarajat_2011_2012_utf8.geojson Kuntarajat_2011_2012.geojson Kuntarajat_2011_2012_utf8.kml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment