All Projects → conveyal → osm-lib

conveyal / osm-lib

Licence: BSD-2-Clause License
A library for opening, updating and manipulating OSM files of any size.

Programming Languages

java
68154 projects - #9 most used programming language

osm-lib

A library for random entity access inside OSM files of any size, up to and including planet.pbf.

Build Status

Build the JAR

$ mvn clean package

Run Vanilla Extract

$ mvn exec:java -Dexec.mainClass="com.conveyal.osmlib.VanillaExtract" -Dexec.args=...

Replicate the planet or a smaller region

You'll want to load from a PBF source that contains a timestamp if you want minutely updates. Planet mirrors, Mapzen Metro Extracts, and Geofabrik extracts contain timestamps. Watch for the timestamp to appear as the load process begins just to make sure it was properly read.

VanillaExtract /mnt/ssd2/vexdata --loadURL http://ftp.snt.utwente.nl/pub/misc/openstreetmap/planet-latest.osm.pbf

VanillaExtract vex.data --loadURL https://s3.amazonaws.com/metro-extracts.mapzen.com/aarhus_denmark.osm.pbf

VanillaExtract /mnt/ssd2/vexdata --load /home/abyrd/france.osm.pbf

VanillaExtract /mnt/ssd2/vexdata --load /home/abyrd/belgium.vex

Load planet from an FTP server in the background

$ nohup time mvn exec:java -Dexec.mainClass="com.conveyal.osmlib.VanillaExtract" -Dexec.args="/mnt/ssd2/vexdata --loadURL ftp://ftp.spline.de/pub/openstreetmap/pbf/planet-latest.osm.pbf" &

Run an extract server with minutely updates

VanillaExtract /mnt/ssd2/vexdata

Fetch a geographic extract

Near Aarhus, Denmark as PBF

wget http://localhost:9001/56.12761,10.056558,56.179451,10.144608.pbf

Near Aarhus, Denmark in VEX format

wget http://localhost:9001/56.12761,10.056558,56.179451,10.144608.vex

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].