- Show file information:
osmium fileinfo path/to/input.osm
- Display contents:
osmium show path/to/input.osm
- Convert file format from PBF into XML:
osmium cat path/to/input.osm.pbf -o path/to/output.osm
- Extract a geographic region by the given [b]ounding box:
osmium extract -b min_longitude,min_latitude,max_longitude,max_latitude path/to/input.pbf -o path/to/output.pbf
- Extract a geographic region by a GeoJSON file:
osmium extract -p path/to/polygon.geojson path/to/input.pbf -o path/to/output.pbf
- Filter all objects tagged as "restaurant":
osmium tags-filter path/to/input.pbf amenity=restaurant -o path/to/output.pbf
- Filter for "way" objects tagged as "highway":
osmium tags-filter path/to/input.pbf w/highway -o path/to/output.pbf
- Filter "way" and "relation" objects tagged as "building":
osmium tags-filter path/to/input.pbf wr/building -o path/to/output.pbf
osmium COMMAND [ARG...]
Multipurpose tool for working with OpenStreetMap data.
Run osmium help COMMAND to get more information about a command. This will only work on Linux and OS/X systems and only if the
man command is available and working correctly.
- -h, --help
Show usage and list of commands.
Show program version.
add node locations to ways in OSM file
apply OSM change file(s) to OSM data file
concatenate OSM files and convert to different formats
filter changesets from OSM changeset files
check referential integrity of OSM file
create OSM change file from two OSM files
display differences between OSM files
export OSM data
create geographical extracts from an OSM file
show information about an OSM file
get objects from OSM file by ID
get parents of objects from OSM file
show help about commands
merge several OSM files into one
merge several OSM change files into one
remove OSM objects with specified IDs
renumber object IDs
show OSM file
sort OSM files
filter OSM data based on tags
filter OSM data by time from a history file
Most commands support the following options:
- -h, --help
Show short usage information.
- -v, --verbose
Set verbose mode. The program will output information about what it is doing to STDERR.
Osmium commands try to do their work as memory efficient as possible. But some osmium commands still need to load quite a bit of data into main memory. In some cases this means that only smaller datasets can be handled. Look into the man pages for the individual commands to learn more about their memory use.
On most commands, if you use the --verbose/-v option, osmium will print out the peak memory usage at the end. This is the actual amount of memory used including the program code itself, any needed libraries, and the data. (Printing of memory usage is currently only available on Linux systems.)
If an osmium command exits with an “Out of memory” error, try running it with --verbose/-v on smaller datasets to get an idea how much memory it needs.
On Linux a program that uses a lot of memory can be killed by the kernel without the program being notified. If you see osmium dieing without any apparent reason, this might be the case. Search on the Internet for “OOM killer” to find out more about this.
- osmium-add-locations-to-ways(1), osmium-apply-changes(1), osmium-cat(1), osmium-changeset-filter(1), osmium-check-refs(1), osmium-derive-changes(1), osmium-diff(1), osmium-export(1), osmium-extract(1), osmium-fileinfo(1), osmium-getid(1), osmium-getparents(1), osmium-merge(1), osmium-merge-changes(1), osmium-renumber(1), osmium-show(1), osmium-sort(1), osmium-tags-filter(1), osmium-time-filter(1), osmium-file-formats(5), osmium-index-types(5), osmium-output-headers(5)
- Osmium website (https://osmcode.org/osmium-tool/)
Copyright (C) 2013-2022 Jochen Topf <firstname.lastname@example.org>.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
If you have any questions or want to report a bug, please go to https://osmcode.org/contact.html
Jochen Topf <email@example.com>.
osmium-add-locations-to-ways(1), osmium-apply-changes(1), osmium-cat(1), osmium-changeset-filter(1), osmium-check-refs(1), osmium-create-locations-index(1), osmium-derive-changes(1), osmium-diff(1), osmium-export(1), osmium-extract(1), osmium-file-formats(5), osmium-fileinfo(1), osmium-getid(1), osmium-getparents(1), osmium-index-types(5), osmium-merge(1), osmium-merge-changes(1), osmium-output-headers(5), osmium-query-locations-index(1), osmium-removeid(1), osmium-renumber(1), osmium-show(1), osmium-sort(1), osmium-tags-count(1), osmium-tags-filter(1), osmium-time-filter(1).