Skip to content

Instantly share code, notes, and snippets.

@teleboas
Forked from ThomasG77/README.md
Created April 20, 2024 16:12
Show Gist options
  • Select an option

  • Save teleboas/a52e4e14952cf95c94aafd103eac093c to your computer and use it in GitHub Desktop.

Select an option

Save teleboas/a52e4e14952cf95c94aafd103eac093c to your computer and use it in GitHub Desktop.
Pompage dump données Geoportail de l'urbanisme

Copie données WFS depuis le géoportail de l'urbanisme

Ici on prend les données GPKG mais shp et CSV aussi disponibles selon vos préférences

# Infos pompées de https://www.geoportail-urbanisme.gouv.fr/image/Manuel_export_massif.pdf
# Obtenu via discussion https://georezo.net/forum/viewtopic.php?pid=367182#p367182
# Do once (to get ssh key)
timeout 5 ssh -oStrictHostKeyChecking=accept-new -p 2200 gpu_depot_exports@sftp-public.ign.fr
# List files
lftp sftp://gpu_depot_exports:yegh5EdeeFeegahz@sftp-public.ign.fr:2200 -e 'ls /pub/export-wfs/;exit' | cut -c 57- |grep -v '\.'
# To get last update with explicit directory date
lftp sftp://gpu_depot_exports:yegh5EdeeFeegahz@sftp-public.ign.fr:2200 -e 'ls /pub/export-wfs/;exit' | cut -c 57- |grep -v '\.' | grep -v latest | sort | tail -n1
# Then you can copy with either latest or date from above command
lftp sftp://gpu_depot_exports:yegh5EdeeFeegahz@sftp-public.ign.fr:2200 -e 'mirror --verbose --use-pget-n=8 -c /pub/export-wfs/latest/gpkg gpkg;exit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment