Skip to content
This repository was archived by the owner on Apr 16, 2023. It is now read-only.

Updating the planet extracting data

ltog edited this page Jan 24, 2015 · 54 revisions

Updating the planet

Extracting data

osmosis

Installation (Ubuntu)

sudo apt-get install osmosis

bbox

osmosis --read-pbf file=$pbfinfile --bounding-box top=$maxlat left=$minlon bottom=$minlat right=$maxlon --write-pbf file=$pbfoutfile

poly

osmosis --read-pbf file="$pbfinfile" --bounding-polygon file="$polyfile" --write-pbf file="$pbfoutfile"

osmconvert

Installation (Ubuntu)

sudo apt-get install osmctools

bbox

osmconvert $pbfinfile -b=$minlon,$minlat,$maxlon,$maxlat --out-pbf [--complete-ways | --complex-ways] -o=$pbfoutfile

poly

osmconvert $pbfinfile -B=$polyfile --out-pbf [--complete-ways | --complex-ways] -o=$pbfoutfile

osmchange

Keine Unterstützung für .pbf / .o5m Dateien.

Installation (Ubuntu)

???

bbox

<$osminfile ./osmchange -b=$minlon,$minlat,$maxlon,$maxlat >$osmoutfile

poly

<$osminfile ./osmchange -B=$polyfile >$osmoutfile

bbox

???

poly

mapsplit [-v] [-Xmx4G] $pbfinfile $pbfoutfile -p=$polyfile [-s=40000000,5000000,2000000]

Benchmarks

osmosis bbox

time osmosis --read-pbf file=switzerland-latest.osm.pbf --bounding-box top=47 left=7 bottom=46 right=8 --write-pbf file=osmosis-out.pbf

0m25

osmosis poly

time osmosis --read-pbf file="switzerland-latest.osm.pbf" --bounding-polygon file="polygon.poly" --write-pbf file="osmosis-out.pbf"

1m05

osmconvert bbox

time osmconvert switzerland-latest.osm.pbf -b=7,46,8,47 --out-pbf -o=osmconvert-out.pbf

0m10

osmconvert poly

time osmconvert switzerland-latest.osm.pbf -B=polygon.poly --out-pbf -o=osmconvert-out.pbf

0m18

Zu klären

  • Sich selbst überschneidende Polygonlinie (wo wird das abgefangen?)
  • bbox über Datumsgrenze
  • Grenzüberlappende Linien, Relationen (osmconvert: Flächen) abschneiden oder behalten?
  • Werden folgende Daten benötigt?
    • Autor
    • Erstellungsdatum
    • Versionsnummer

Clone this wiki locally