Command line tool for working with OpenStreetMap data based on the Osmium library.
GPL-3.0 License
Bot releases are hidden (Show)
GetObject()
function from RapidJSON.Published by joto almost 2 years ago
--remove-deleted/--simplify
option on the apply-changes
command.--omit-rs
option on the export
command.--history
option on the getid
command.Published by joto over 2 years ago
--keep-member-nodes
option to add-locations-to-ways
command. When this is set, all nodes referenced directly from relations are kept in the output. If this is used, the input file is read twice an a bit more memory is needed. Osmium will run around 15% longer than without this option.-S relations=false
option to complete_ways
extract strategy. If you don't need any relations you can set this when using osmium extract
and the extract will be done more quickly.--clean
option to osmium extract
command to clean attributes.osmium show
command was less then 4 characters long.osmium show
when a non-existing pager was used.-e
or -E
options are used.Published by joto about 3 years ago
osmium removeid
command to remove all objects with the specified IDs from an OSM file. (This is, in a way, the opposite of the osmium getid
command.)osmium-output-headers(5)
man page with details about the settings supported by the --output-header
command line option.-g header.boxes
output option to osmium fileinfo
to get the bounding box(es) set in the header.--attributes
for the export command to specified attributes that should show up in the output files. (This needed a config file before.)--buffer-data
for osmium cat
command to buffer all read data in memory before writing it out again. Can be used for benchmarking.osmium merge
command now checks that the input files are ordered correctly and warns or stops if this is not the case.osmium cat
.none
index type on osmium export
.Published by joto over 3 years ago
osmium-file-formats
man page to include newer file format options.extract
command did not work correctly on history files. Sometimes deleted objects were not detected as such and the resulting file was not a correct history file.tags-filter
command if -R
, --omit-referenced
is used. This way it works when reading from STDIN.Published by joto almost 4 years ago
-i
, --invert-match
option on tags-filter command.osmium cat
output.WITH_LZ4
to OFF
.null
value for this.fileinfo
command now shows a Metadata section as described in the man page.-I
, --id-osm-file
option in the tags-filter
command, not only the objects in the specified file were marked but also the nodes referenced from ways and the members referenced from relations. This had two results: a) When not using -r
, --add-referenced
: too many objects ended up in the resulting file. b) When using -t
, --remove-tags
: tags from those member objects were not removed.Published by joto over 4 years ago
Published by joto over 4 years ago
osmium tags-count
command.--clean
option to osmium cat
command to clean attributes.Published by joto almost 5 years ago
--format-option
/-x
) or in the format_options
section in the config file. Settings can be any OPTION=VALUE type string. There are two new settings: For the geojsonseq format, the option print_record_separator=false
replaces the command line option --omit-rs
/-r
which is now deprecated. The tags_format
option for the Pg output format allows using the hstore
type for tags instead of json(b)
.--remove-tags
, matching ways got their tags removed if they are also referenced from relations. This was clearly wrong.Published by joto about 5 years ago
--remove-tags
/-t
to getid
command. When used the tags of all objects are removed that are not explicitly requested but are only included to complete references.create-locations-index
and query-locations-index
commands. These are used to create, update, query and dump node location indexes on disk. These indexes store the location of nodes, typically to add them to ways and relations later. It is the same format used by osm2pgsql (they call it "flat node store") and by the add-locations-to-ways
command.--output-header
to copy header from input. Sometimes it is useful to copy header fields from the input to the output, for instance the osmosis_replication_timestamp
field. This can now be done for some commands (currently only extract
) by using the special syntax --output-header=OPTION!
, i.e. using an exclamation mark instead of setting a value.sorting
of the libosmium library which is not in a released version yet. This sets the Sort.Type_then_ID
header property in the PBF file.get_start_id()
is not noexcept
.dense_file_array
and sparse_file_array
) that need a file name. Using them was not possible because of an overzealous check that didn't recognize the file name.Published by joto almost 6 years ago
fileinfo
command now has an --object-type
/-t
option like some other commands.fileinfo
command to show internal buffer counts and sizes.--strategy
option to sort
command. New multipass
strategy which reads the input file(s) three times making the sort a bit slower, but also using less memory.--remove-tags
/-t
to tags-filter
command. When used the tags of all objects that are not matching the filter expression but are included as references are removed.complete-partial-relations=X
will complete all relations with at least X percent of their members already in the extract.extract
command.tags-filter
command which could lead to wrong results.Published by joto about 6 years ago
export
command man page.linear_tags
and area_tags
should be true
. It was before v1.9.0 and it is documented this way.Published by joto about 6 years ago
tags-filter
. The tags-filter
command can now match "areas" using the "a/" prefix. Areas in this sense are all closed ways with 4 or more nodes and all relations with tag "type=multipolygon" or "type=boundary".--geometry-types
option to the export
command allowing you to restrict the geometry types written out.fileinfo
command.renumber
command, the start IDs for nodes, ways, and relations can now be set together or separately with the --start-id
option. Negative IDs are now also allowed. Also there is a new --show-index
function that prints out the ID mappings in the index.-C
, --print-default-config
option to the export
command writing out the default configuration to stdout.getparents
command to get the ways used by specified nodes or relations having specified members.--crc
/-c
to enable it. It will also be automatically enabled for JSON output to stay compatible with earlier versions of Osmium which might be used in an automated context (you can disable this with --no-crc
). It is also enabled if -g data.crc32
is specified. If it is enabled we are using the CRC32 implementation from zlib which is faster than the one from boost we used before. This is possible through some changes in libosmium.export
command instead of looking at the IDs. This is more consistent with what the libosmium MultipolygonManager
does.export
command, the decision whether a way is treated as a linestring or polygon has changed. See the man page for details.-n
or --keep-untagged
option is set. It doesn't matter whether they are closed or not, they are only written out as linestrings.--show-errors
is set.--(no)-progress
option work in sort
command.Published by joto over 6 years ago
--redact
option to the apply-changes
command to redact (patch) history files. The change files can contain any version of any object which will replace that version of that object from the input. This allows changing the history! This mode is for special use only, for instance to remove copyrighted or private data.catch.hpp
to version 1.12.1.--keep-details
. A deletion of any type of object was written as a deletion of a node. (Thanks to Michael Reichert.)simple
strategy, with other strategies it will give you a nice error message.clang-tidy
warnings making the code more robust.Published by joto about 7 years ago
fileinfo -g
. There is no final list of possible options, so any option should be allowed.extract
command was not reading config files correctly and all resulting OSM files were empty. Specifying an extract on the command line using --bbox
or --polygon
was still working.Published by joto about 7 years ago
export
command for exporting OSM data into GeoJSON format. The OSM data model with its nodes, ways, and relations is very different from the data model usually used for geodata with features having point, linestring, or polygon geometries. The export command transforms OSM data into a more usual GIS data model. Nodes will be translated into points and ways into linestrings or polygons (if they are closed ways). Multipolygon and boundary relations will be translated into multipolygons. This transformation is not loss-less, especially information in non-multipolygon, non-boundary relations is lost. All tags are preserved in this process. Note that most GIS formats (such as Shapefiles, etc.) do not support arbitrary tags. Transformation into other GIS formats will need extra steps mapping tags to a limited list of attributes. This is outside the scope of this command.--bbox/-B
option to changeset-filter
command. Only changesets with bounding boxes overlapping this bounding box are copied to the output.flex_mem
index type for node location indexes. It is used by default in the add_locations_to_ways
and export
commands. The new man page osmium-index-types
documents this and other available indexes.sort
command has changed when negative IDs are involved. (Negative IDs are sometimes used for objects that have not yet been uploaded to the OSM server.) The negative IDs are ordered now before the positive ones, both in order of their absolute value. This is the same ordering as JOSM uses.check-refs
, fileinfo
, and renumber
now also work with negative object IDs.getid
command.Published by joto over 7 years ago
diff
and derive-changes
commands in manPublished by joto over 7 years ago
tags-filter
command for filtering OSM files based on tag keys and--locations-on-ways
to apply-changes
for updating filesadd-locations-to-ways
.output_header
on extracts in config file. (#47)--change-file-format
to apply-changes
format for setting format--set-bounds
option to extract
command.--history
option on getid
command in favour of--with-history
for consistency with other commands.RelationsMapIndex
from libosmium for getid
instead ofstd::multimap
.osmium::util::file_size
instead of our own filesize()
function.-pthread
compiler and linker options on Linux/OSX. This should fix--as-needed
option is used.extract
command.Published by joto almost 8 years ago
--overwrite
and --fsync
work in derive_changes
command.derive_changes
.Published by joto almost 8 years ago
extract
command to cut out geographical regions from an OSM file