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

mapsplit

Installation (Ubuntu)

sudo apt-get install default-jdk ant
git clone https://github.com/PedaB/mapsplit.git
cd mapsplit
ant

Ein Verzeichnis zum Path hinzufügen: https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path

bbox

???

poly

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

Benchmarks

osmosis poly

mapsplit poly

time ./mapsplit -v -Xmx1200M ../test/switzerland-latest.osm.pbf ../test/mapsplit-out.osm.pbf -p=../test/polygon.poly -s=12000000,800000,300000

grösser 3m50

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

Clone this wiki locally