Created
February 24, 2017 13:17
-
-
Save cquest/adc499132354bc55e5e3df589ed8e9d2 to your computer and use it in GitHub Desktop.
Script d'extraction des métadonnées du Géoportail de l'Urbanisme
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
psql -Atc "select insee from insee_cog_2015;" | \ | |
parallel -j 8 \ | |
wget -q -nc "https://www.geoportail-urbanisme.gouv.fr/document/info/?partition=DU_{}" -O {}.json | |
: > gpu.sjson; for f in *.json; do insee=$(echo $f |sed 's/.json//'); sed "s/\"success\"/\"insee\":\"$insee\", \"success\"/" $f >> gpu.sjson; done | |
jq -sc '.' gpu.sjson > gpu.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On dirait que le lien pour les partitions n'est plus valide suite à la mise à jour du portail de l'urbanisme!