Ich bin zur Zeit gerade am Rumspielen mit Leaflet: “an open-source JavaScript library for mobile-friendly interactive maps”
map.panTo([50, 30]);
map.panTo({lng: 30, lat: 50});
map.panTo({lat: 50, lng: 30});
map.panTo(L.latLng(50, 30));
Sources:
OpenStreetMap to GeoJSON and on GitHub
$ incus cp ubuntu2404-tinytemplate osmexp
$ incus start osmexp
$ incus exec osmexp bash
$ apt update
$ apt install pipx
$ pipx install osmexp
$ pipx ensurepath
$ PATH=$PATH:/root/.local/bin
$ osmexp rel 1682225 > uster.geojson
$ incus file pull osmexp/root/uster.geojson .
$ cat switzerland.geojson | jq --color-output | less -R
Local: GeoJSON Minify
Precision 5 - 1.11 m roughly at the Equator
Precision 4 - 11.1 m roughly at the Equator
Precision 3 - 111 m roughly at the Equator
Precision 2 - 1.11 km roughly at the Equator
mapshaper
installierenIm Container:
$ apt install npm
$ npm install -g mapshaper
$ mapshaper -h
$ mapshaper -h simplify
$ mapshaper switzerland_osm.geojson -info
[info]
=========================
Layer: switzerland_osm
-------------------------
Type: polygon
Records: 3
Bounds: 5.9559113,45.8179579,10.4922941,47.8084544
CRS: +proj=longlat +datum=WGS84
Source: switzerland_osm.geojson
Attribute data: [none]
$ mapshaper switzerland_osm.geojson -simplify 10% -o switzerland_osm_10pct.geojson
$ npm install -g geojson-merge
$ geojson-merge brazil_prec3_10pct.geojson russia_prec3_10pct.geojson india_prec3_10pct.geojson china_prec3_10pct.geojson > BRIC.geojson
$ mapshaper BRIC.geojson -simplify 10% -o BRIC_10pct.geojson