Skip to content

Instantly share code, notes, and snippets.

View ThomasG77's full-sized avatar

Thomas Gratier ThomasG77

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
url name
https://geoservices.ign.fr/ressource/165872 BD TOPO® Départementale Shapefile - D001 Ain - Décembre 2021
https://geoservices.ign.fr/ressource/158218 BD TOPO® Départementale Shapefile - D001 Ain - Mars 2021
https://geoservices.ign.fr/ressource/165876 BD TOPO® Départementale Shapefile - D002 Aisne - Décembre 2021
https://geoservices.ign.fr/ressource/158225 BD TOPO® Départementale Shapefile - D002 Aisne - Mars 2021
https://geoservices.ign.fr/ressource/165881 BD TOPO® Départementale Shapefile - D003 Allier - Décembre 2021
https://geoservices.ign.fr/ressource/158220 BD TOPO® Départementale Shapefile - D003 Allier - Mars 2021
https://geoservices.ign.fr/ressource/165891 BD TOPO® Départementale Shapefile - D004 Alpes-de-Haute-Provence - Décembre 2021
https://geoservices.ign.fr/ressource/158232 BD TOPO® Départementale Shapefile - D004 Alpes-de-Haute-Provence - Mars 2021
https://geoservices.ign.fr/ressource/165887 BD TOPO® Départementale Shapefile - D005 Hautes-Alpes - Décembre 2021
@ThomasG77
ThomasG77 / process_lidar_laz.md
Last active February 13, 2022 14:10
Process to convert laz file to DTM
from qgis.core import QgsProject, QgsPointCloudLayer
# File url from the demo to download and uncompress
# https://wxs.ign.fr/c90xknypoz1flvgojchbphgt/telechargement/prepackage/LIDARHD_PACK_NP_2021$LIDARHD_1-0_LAZ_NP-0808_6307-2021/file/LIDARHD_1-0_LAZ_NP-0808_6307-2021.7z
# Add layer and add index automatically if not present
cl1 = QgsPointCloudLayer('LIDARHD_1-0_LAZ_NP-0808_6307-2021/Semis_2021_0808_6306_LA93_IGN69.laz', 'Semis_2021_0808_6306_LA93_IGN69', 'pdal')
if cl1.isValid():
QgsProject.instance().addMapLayer(cl1)
id_bal code nom type dateMAJ rowsCount ignored
5be174928b4c412c5b8cc23f 69003 Albigny-sur-Saône commune-actuelle 2021-12-10 782
5be174928b4c412c5b8cc23f 69029 Bron commune-actuelle 2022-01-25 4988
5be174928b4c412c5b8cc23f 69033 Cailloux-sur-Fontaines commune-actuelle 2021-12-30 740
5be174928b4c412c5b8cc23f 69034 Caluire-et-Cuire commune-actuelle 2022-01-06 4916
5be174928b4c412c5b8cc23f 69040 Champagne-au-Mont-d'Or commune-actuelle 2021-11-08 1029
5be174928b4c412c5b8cc23f 69044 Charbonnières-les-Bains commune-actuelle 2020-06-11 1181
5be174928b4c412c5b8cc23f 69046 Charly commune-actuelle 2022-01-25 1693
5be174928b4c412c5b8cc23f 69063 Collonges-au-Mont-d'Or commune-actuelle 2021-12-15 952
5be174928b4c412c5b8cc23f 69068 Couzon-au-Mont-d'Or commune-actuelle 2021-12-28 880
wget 'https://wxs.ign.fr/c90xknypoz1flvgojchbphgt/telechargement/prepackage/LIDARHD_PACK_NP_2021$LIDARHD_1-0_LAZ_NP-0808_6307-2021/file/LIDARHD_1-0_LAZ_NP-0808_6307-2021.7z'
unp LIDARHD_1-0_LAZ_NP-0808_6307-2021.7z
zip -r LIDARHD_1-0_LAZ_NP-0808_6307-2021.zip LIDARHD_1-0_LAZ_NP-0808_6307-2021/
du -cksh LIDARHD_1-0_LAZ_NP-0808_6307-2021
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
ID;ENSEIGNE;ADRESSE;COMPLEMENT;CODE POSTAL;COMMUNE;NATURE DU DEBIT
1;;32 route des grands champs;TABAC;01400;L-ABERGEMENT-CLEMENCIAT;Ordinaire permanent
2;;42 RUE ROGER VAILLANT;CC DAME LOUISE-TABAC-;01500;AMBERIEU-EN-BUGEY;Ordinaire permanent
3;TABAC DE LA GARE;6 AV DU GENERAL SARRAIL;TABAC;01500;AMBERIEU-EN-BUGEY;Ordinaire permanent
4;MAISON DE LA PRESSE;14 R BERARD;TABAC;01500;AMBERIEU-EN-BUGEY;Ordinaire permanent
5;;8 AV PAUL PAINLEVE;TABAC;01500;AMBERIEU-EN-BUGEY;Ordinaire permanent
6;LA ROSERAIE;33 rue de la ruelle;TABAC;01330;AMBERIEUX-EN-DOMBES;Ordinaire permanent
7;;114 GRANDE RUE;TABAC;01500;AMBRONAY;Ordinaire permanent
8;L'EQUATEUR;69 R GENERAL ANDREA;TABAC;01100;ARBENT;Ordinaire permanent
9;VIVAL;97 R CENTRALE;TABAC;01200;BELLEGARDE-SUR-VALSERINE;Ordinaire permanent
wget --content-disposition "https://opendata.arcgis.com/api/v3/datasets/002f14c0cf28435296a341d9921adf99_0/downloads/data?format=shp&spatialRefId=2154"
unzip EMPRISE_BATIE_PARIS.zip
export SHAPE_ENCODING="WINDOWS-1252"
ogr2ogr emprise_batie_paris_with_attribute.shp -dialect SQLite -sql "SELECT *, CASE WHEN c_toitdom = 1 THEN 'tuiles' WHEN c_toitdom = 2 THEN 'zinc' WHEN c_toitdom = 3 THEN 'ardoise' WHEN c_toitdom = 4 THEN 'béton' WHEN c_toitdom = 5 THEN 'terrasses végétales' WHEN c_toitdom = 99 THEN 'non renseigné' END c_toitdoml FROM EMPRISE_BATIE_PARIS" EMPRISE_BATIE_PARIS.shp -lco ENCODING=UTF-8
mapshaper emprise_batie_paris_with_attribute.shp \
-colorizer name=calcFill colors='#842e1b,#bac4c8,#5a5e6b,#808076,#a3b553,black' categories='tuiles,zinc,ardoise,béton,terrasses végétales,non renseigné' \
-style fill='calcFill(c_toitdoml)' stroke='#aaa' stroke-width=0.1 \
-o output_toit_dominant.svg
import re
import csv
import ssl
import urllib.request
ssl._create_default_https_context = ssl._create_unverified_context
baseUrl = 'https://geoservices.ign.fr/'
url_page = baseUrl + 'documentation/services'