Skip to content

Instantly share code, notes, and snippets.

View frodrigo's full-sized avatar

Frédéric Rodrigo frodrigo

  • Bordeaux, France
View GitHub Profile
<html>
<head>
<script src='https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.js'></script>
<link href='https://unpkg.com/maplibre-gl@latest/dist/maplibre-gl.css' rel='stylesheet' />
</head>
<body>
<div id='map' style='width: 400px; height: 300px;'></div>
<button id="switch">switch</button>
@frodrigo
frodrigo / mapillary-api-migration-mapping.csv
Created August 1, 2021 13:25
Mapillary OSM image ids mapping API v3->v4
We can't make this file beautiful and searchable because it's too large.
000e_27e_tqLCdb9CBFGUw,201806584885253
001I2zgw4XYUd0M4NhEn5q,132544045580789
-001OBoPf5xqwF2DkKbcXg,972321333309051
003WfIoU4IEKBmmdZbNRWg,524234155604844
004qzGfI60_UufpZiChJUQ,585250959532652
005XnDMRIPieC620ZpR8Tw,168442815185376
006IhrvL5VnEeGWaXWp2jw,2341332076011387
006O9gBCnErho7hbf6KlXg,264917715378049
006Y0nFh28sUCIH5-9nFRQ,1191640781273579
007MoMY_71QTM36QNqSxCQ,1293216244426882
git clone https://github.com/trahay/bbb-downloader.git
cd bbb-downloader/
virtualenv venv
source venv/bin/activate
pip install -r python-requirements.txt
./download_bbb_data.py https://osmrecordings.cloud68.co/playback/presentation/2.0/playback.html?meetingId=8e094cae9607d20acc55dea61c142ee3f61facdf-1620153757937
./integrate_soundtrack.sh 8e094cae9607d20acc55dea61c142ee3f61facdf-1620153757937/Videos mapcontrib-202010504.mp4
{"tiles":["https://openmaptiles.geo.data.gouv.fr/data/cadastre/{z}/{x}/{y}.pbf"],"name":"cadastre","format":"pbf","basename":"cadastre.mbtiles","id":"cadastre","description":"dist/parcelles.mbtiles","version":"2","minzoom":11,"maxzoom":16,"center":[55.445251,-20.902437,16],"bounds":[-63.154907,-21.391705,55.838013,51.089723],"type":"overlay","attribution":"<a href=\"https://cadastre.data.gouv.fr/datasets/cadastre-etalab\">Données cadastrales Etalab (janvier 2020)</a>","generator":"tile-join v1.34.2","generator_options":"tippecanoe --no-tile-stats --detect-shared-borders --simplify-only-low-zooms --generate-ids --read-parallel --force --layer batiments --drop-densest-as-needed -Z14 -z16 --output dist/batiments.mbtiles; tippecanoe --no-tile-stats --detect-shared-borders --simplify-only-low-zooms --generate-ids --read-parallel --force --layer sections --coalesce-densest-as-needed -Z11 -z16 --output dist/sections.mbtiles; tippecanoe --no-tile-stats --detect-shared-borders --simplify-only-low-zooms --generate-ids
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@frodrigo
frodrigo / index.html
Last active May 12, 2020 09:09
Teritorio - Change icon style
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Change a map's boundaries</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.css' rel='stylesheet' />
<style>
@frodrigo
frodrigo / index.html
Last active May 12, 2020 08:15
Teritorio - Demo - Lang
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Change a map's language</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.css' rel='stylesheet' />
<script src="https://cdn.klokantech.com/openmaptiles-language/v1.0/openmaptiles-language.js"></script>
@frodrigo
frodrigo / index.html
Last active May 12, 2020 08:16
Teritorio - Demo - Click
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Highlight & Popup</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.9.1/mapbox-gl.css' rel='stylesheet' />
<style>
@frodrigo
frodrigo / README.md
Last active May 12, 2020 08:16
Change a map's boundaries

Experiment on Disputed and Claimed OSM boundaries

I made an attempted to display boundaries according to some countries official point of view. Most of boundary are consensual. But some are de facto with no recognition from one or two of the neighbors. This facto are the ground mapped in OSM. But some countries have different political claims over the territories. Display this claim is often mandatory in these countries. So some boundaries or territories are disputed by countries. Disputed here meaning, that the country is not officially recognized the de facto ground status. Some other boundaries or territories are claimed. The idea here is partially based on the rejected proposed features “Mapping disputed boundaries”.

Consensual borders does not require more details.

Disputed boundaries are here treated as way level. As only a part of the de facto boundary is rejected.

@frodrigo
frodrigo / healthcare_FR_finess.sh
Created August 8, 2018 12:12
Reformatage de l'Extraction Finess des Etablissements Geolocalisés en un seule section
# Install csvkit before, on Ubuntu python2-csvkit or python3-csvkit
cat etalab_cs1100507_stock_20180608-0437.csv | grep 'structureet;' | iconv -f ISO-8859-15 -t utf-8 | csvcut -d ';' -C 1 > finess-structureet.csv
cat etalab_cs1100507_stock_20180608-0437.csv | grep 'geolocalisation;' | iconv -f ISO-8859-15 -t utf-8 | csvcut -d ';' -C 1 > finess-geolocalisation.csv
echo "nofinesset,nofinessej,rs,rslongue,complrs,compldistrib,numvoie,typvoie,voie,compvoie,lieuditbp,commune,departement,libdepartement,ligneacheminement,telephone,telecopie,categetab,libcategetab,categagretab,libcategagretab,siret,codeape,codemft,libmft,codesph,libsph,dateouv,dateautor,datemaj,numuai,coordxet,coordyet,sourcecoordet,datemajcoord" > finess.csv
csvjoin --no-header-row --columns 1,1 --left finess-structureet.csv finess-geolocalisation.csv | tail -n +2 >> finess.csv