Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Gratier ThomasG77

View GitHub Profile
View README.md
View index.html
<head>
<!-- Load plotly.js into the DOM -->
<script src='https://cdn.plot.ly/plotly-2.9.0.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js'></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id='myDiv'><!-- Plotly chart will be drawn inside this DIV --></div>
<script src="script.js"></script>
View exemple-valide.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
id;longitude;latitude;famille_arbre;genre_arbre;espece_arbre;cultivar_variete_arbre;nom_vernaculaire;code_insee;code_postal;adresse;matricule_arbre;date_plantation;hauteur;diametre;type_sol;type_enracinement;port_arbre;arbre_remarquable;arbre_protege;contraintes_sol;contrainte_aeriennes;eclairage;arrosage;allergie;remarque
1;49.802;0.3768;Sapindaceae;Acer;campestre;;Erable champetre;13028;13600;320 Avenue Joseph Roumanille;259001;2018-05-12;100;58;Argilo-sableux;Oblique;Boule;Non;Non;Sol perméabilisé;Cables éléctriques;Oui;Goutte à goutte;3;
2;43.2959;5.3761;Rosaceae;Pyrus;calleryana;chanticleerc;"Poirier ""chanticleerc""";13055;13001;60 rue sainte;1998PyrCal130011150;1998-04-20;235;73;Argileux;Pivotant;;Non;Non;Grille abimée;proximité d'un mur;Non;;;tronc abimé lors de travaux
3;43.2915;5.4805;Platanaceae;Platanus;occidentalis;;Platane d'Amérique;13055;13002;72 Boulevard des Dames;;1990-03-01;;;;;;Non;Non;;;Oui;;2;dans un alignement
4;44.2920;5.3705;Pinaceae;Pinus;sylvestris;;Pin sylvestre;13055;13013;48 ru
View philly_sjoin.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View avancement-lidar.sh
wget "https://macarte.ign.fr/carte/322ea69dab4c7e5afabc6ec7043b5994/acquisitionslidarhd"
cat acquisitionslidarhd | grep " symfony.data = "| sed 's# symfony.data = ##g' >| out.json
jq -c '.layers[2].features[] | {"type": "Feature", "geometry": {"type": .type, "coordinates": .coords}, "properties": .attributes}' out.json | jq --slurp '{"type": "FeatureCollection", "features": .}' >| out.geojson
ogr2ogr -f GeoJSON -s_srs "EPSG:3857" -t_srs "EPSG:4326" lidar_hd_overall.geojson out.geojson -lco RFC7946=YES
@ThomasG77
ThomasG77 / README.md
Last active Mar 8, 2022
Consommation à distance du Geopackage BDTOPO France entière Sept 2021 - 83Go
View README.md

GDAL VSICURL tests to remote BDTOPO Geopackage France

# MultiPolygon output
ogr2ogr -f GeoJSON /tmp/mairies_multipolygons.geojson "/vsicurl/https://labs.webgeodatavore.com/partage/bdtopo.gpkg" \
        -lco RFC7946=YES \
        -sql "SELECT code_insee, nom_officiel, liens_vers_autorite_administrative, zone_d_activite_ou_d_interet.* FROM commune LEFT JOIN zone_d_activite_ou_d_interet ON liens_vers_autorite_administrative = zone_d_activite_ou_d_interet.cleabs"

# Point output
ogr2ogr -f GeoJSON /tmp/mairies_points.geojson "/vsicurl/https://labs.webgeodatavore.com/partage/bdtopo.gpkg" \
View folium_style_function.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ThomasG77
ThomasG77 / ukraine_bookshops_points.geojson
Created Mar 1, 2022
Bookstores and libraries in Ukraine, Extract from OpenStreetMap
View ukraine_bookshops_points.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View barrages_infos_cleaned.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ThomasG77
ThomasG77 / ign_fr_proxy.php
Created Feb 25, 2022
Proxy to IGN actu RSS
View ign_fr_proxy.php
<?php
header('Content-type: text/xml;charset=UTF-8');
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$url = 'https://geoservices.ign.fr/actualites/rss.xml';
$homepage = file_get_contents($url, false, stream_context_create($arrContextOptions));