osmium
Osmium is a powerful command line tool used for working with OpenStreetMap (OSM) data. It is written in C++ and is part of the Osmium library, which provides various functions for working with OSM files.
With Osmium, you can perform various OSM-related tasks, such as reading, writing, and modifying OSM files. It supports multiple file formats, including OSM XML, PBF (Protocolbuffer Binary Format), and OPL (Osmium Primitive List).
The tool allows you to filter OSM data based on specific criteria using OSM tags, spatial extents, time stamps, and other attributes. You can extract specific regions of the OSM data or create subsets based on specific tags.
Osmium provides functionalities for manipulating OSM data, such as adding, removing, or modifying tags of OSM objects like nodes, ways, and relations. It can also split or merge OSM files, convert between different file formats, and generate statistics about the OSM data.
The tool supports parallel processing, allowing you to take full advantage of multi-core CPUs for faster data processing. It also offers various output options, including writing the modified OSM data to files or sending it to standard output for further processing.
Osmium supports scripting and automation through its command line interface, enabling you to create complex workflows for OSM data processing. It also integrates with other tools and libraries, such as GDAL, for additional functionality.
The Osmium library and command line tool are actively maintained and have a strong user community. They are open source and released under the GNU General Public License (GPL).
Overall, Osmium is a versatile command line tool that provides a range of features for working with OSM data efficiently and effectively. Whether you are a data analyst, developer, or OSM enthusiast, Osmium can assist you in your OSM-related tasks.
List of commands for osmium:
-
osmium:tldr:20610 osmium: Filter all objects tagged as "restaurant".$ osmium tags-filter ${path-to-input-pbf} amenity=restaurant -o ${path-to-output-pbf}try on your machineexplain this command
-
osmium:tldr:40b40 osmium: 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}try on your machineexplain this command
-
osmium:tldr:54ea7 osmium: Filter "way" and "relation" objects tagged as "building".$ osmium tags-filter ${path-to-input-pbf} wr/building -o ${path-to-output-pbf}try on your machineexplain this command
-
osmium:tldr:57f0a osmium: Filter for "way" objects tagged as "highway".$ osmium tags-filter ${path-to-input-pbf} w/highway -o ${path-to-output-pbf}try on your machineexplain this command
-
osmium:tldr:7ced9 osmium: Extract a geographic region by a GeoJSON file.$ osmium extract -p ${path-to-polygon-geojson} ${path-to-input-pbf} -o ${path-to-output-pbf}try on your machineexplain this command
-
osmium:tldr:8b004 osmium: Convert file format from PBF into XML.$ osmium cat ${path-to-input-osm-pbf} -o ${path-to-output-osm}try on your machineexplain this command
-
osmium:tldr:bdd1e osmium: Show file information.$ osmium fileinfo ${path-to-input-osm}try on your machineexplain this command
-
osmium:tldr:be012 osmium: Display contents.$ osmium show ${path-to-input-osm}try on your machineexplain this command