Last active
October 19, 2022 06:24
-
-
Save mikaelhg/60f7e70d79ae8c11cdc1a3e75065816e to your computer and use it in GitHub Desktop.
Postinumeroalueet 2022 query and conversion to GeoJSON (Paavo)
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
#!/bin/bash | |
wget -O pno_2022.zip \ | |
'https://geo.stat.fi/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=postialue:pno_2022&outputFormat=SHAPE-ZIP' | |
unzip pno_2022.zip | |
ogr2ogr -f GeoJSON -s_srs pno_2022Polygon.prj -t_srs EPSG:4326 \ | |
-lco RFC7946=YES pno_2022.geojson.iso88591 pno_2022Polygon.shp | |
iconv -f iso-8859-15 -t utf-8 < pno_2022.geojson.iso88591 > pno_2022.geojson | |
pigz -k pno_2022.geojson | |
wget -O pno_2022.json \ | |
'https://geo.stat.fi/geoserver/wfs?request=GetFeature&typeName=postialue:pno_2022&srsName=EPSG:4326&outputFormat=json' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As PX: https://pxdata.stat.fi/database/Postinumeroalueittainen_avoin_tieto/2022/paavo_pxt_12f7.px