Releases: osmcode/libosmium
Releases · osmcode/libosmium
Version 2.22.0
Changed
- Extend RelationsMapIndex to work with 64bit IDs. This should not change anything for typical OSM use (where relation IDs fit in 32bit), but help with users adding their own relations.
- Removed deprecated support for regexes from osmium::tags::Filter, use osmium::TagsFilter instead (
osmium/tags/regex_filter.hppremoved). - Remove special cases disabling regex support for old C++ libs.
- Various code cleanups.
Version 2.21.0
Changed
- Switched to C++14 as minimum requirement
- Removed suport for Google Sparsehash
- Removed support for projection using the Proj library (which only worked for very old versions of Proj)
- Various refactoring and code cleanups
Fixed
- Fix problem where bz2 files were not read completely (#373)
- Order deleted objects after visible ones in reverse id order. This fixes a problem when merging diffs for different extracts.
- Remove resource leak in temp file creation
Version 2.20.0
Changed
- Optionally allow fractional seconds in timestamps in OSM files.
- Enable
posix_fadviseusage on FreeBSD. - Make parsing PBFs a bit less picky.
- Various small code cleanups.
Fixed
- Don't use class template arguments on
GeometryFactoryconstructor definition.
Version 2.19.0
Changed
- Mark RapidJSON support as deprecated.
- Update included Catch to v2.13.10.
- Remove deprecated BoolVector class.
- Remove deprecated NWRIdSet class.
- Remove deprecated AssemblerConfig constructor.
- Print start of offending string in overlong string exception.
- Implement
set_thread_name()on FreeBSD. - Some small code cleanups.
Fixed
- Fix return type in
MembersDatabaseCommon::count_not_removed(). - Make bzip2 unit tests pass on musl-based systems.
- Fix bug in members database test case.
Version 2.18.0
Changed
- Use
system_errorinstead ofruntime_errorwhere it fits better. - Remove
OSMIUM_NORETURNmacro. This hasn't been used in a while.
Removed deprecated parts of the code
Several parts of libosmium have been marked deprecated, many of them for a very long time. These are now removed:
- Sparsehash index class
osmium::index::map::SparseMemTableas well as the complete fileosmium/index/map/sparse_mem_table.hpp. - Callback functionality of the
osmium::memory::Bufferclass. Theset_full_callback()will not be available any more. See the source for replacement options. - Various
osmium::builder::build_*functions inosmium/builder/builder_helper.hpp. Useosmium::builder::add_*functions instead. Removesbuilder_helper.hpp. osmium::builder::Builder::add_item(const osmium::memory::Item* item). Use the function of the same name taking a reference instead.osmium::builder::OSMObject/ChangesetBuilder::add_user(). Useset_user()instead.osmium::builder::ChangesetBuilder::bounds()returning a modifiable reference. Useset_bounds()instead.- Several functions around
osmium::io::OutputIterator. osmium::Area::inner_ring_cbegin/cend(), useinner_rings()instead.osmium::RelationMember::ref(), useset_ref()instead.- Implicit conversion from
osmium::Timestamptostd::time_t. Useseconds_since_epoch()instead. osmium::string_to_user_id(), usestring_to_uidinstead.osmium::static_cast_with_assert()helper functions as well as the complete include fileosmium/util/cast.hpp.- Some constructors of
osmium::util::MemoryMappingandosmium::util::TypedMemoryMapping. Use other constructor instead.
Version 2.17.3
Fixed
- Removed possible deadlock when shutting down active Reader.
Version 2.17.2
Changed
- Libosmium now supports being compiled in C++17 and C++20 mode. The minimum version required is still C++11, but if you use libosmium in an C++17 or C++20 application this should work properly.
- Switch from catch version 1 to catch2 as test framework.
- When
std::variantis available (C++17 and above), libosmium will use that instead ofboost::variantreducing the dependencies a little bit. - Removed various workaround that were needed for older MSVC compilers.
- Remove use of
boost::filter_iteratorandboost::indirect_iterator. The removes the dependency on Boost Iterator. - Examples now mostly use the somewhat cleaner
returninstead ofstd::exit()to return an exit code frommain. - As always: Various small code cleanups.
Fixed
- When ordering OSM objects (mostly use in the
CheckOrderhandler), the smallest id possible (INTMIN) wasn't sorted correctly. - Threading problem when reading files.
- Possible dereference of invalid iterator in legacy area assembler. This only affects the legacy area assembler that takes old-style multipolygons into account, so modern code that is not working with history data is not affected.
- Fixed read from an empty queue when reading a file which could block libosmium forever when an error was encountered while reading a file.
Deprecated
Several parts of libosmium have been marked deprecated, many of them for a very long time. These will not be part of the next version of libosmium:
- Sparsehash index class
osmium::index::map::SparseMemTableas well as the complete fileosmium/index/map/sparse_mem_table.hpp. - Callback functionality of the
osmium::memory::Bufferclass. Theset_full_callback()will not be available any more. See the source
for replacement options. - Various
osmium::builder::build_*functions inosmium/builder/builder_helper.hpp. Useosmium::builder::add_*functions instead. Removesbuilder_helper.hpp. osmium::builder::Builder::add_item(const osmium::memory::Item* item). Use the function of the same name taking a reference instead.osmium::builder::OSMObject/ChangesetBuilder::add_user(). Useset_user()instead.osmium::builder::ChangesetBuilder::bounds()returning a modifiable reference. Useset_bounds()instead.- Several functions around
osmium::io::OutputIterator. osmium::Area::inner_ring_cbegin/cend(), useinner_rings()instead.osmium::RelationMember::ref(), useset_ref()instead.- Implicit conversion from
osmium::Timestamptostd::time_t. Useseconds_since_epoch()instead. osmium::string_to_user_id(), usestring_to_uidinstead.osmium::static_cast_with_assert()helper functions as well as the complete include fileosmium/util/cast.hpp.- Some constructors of
osmium::util::MemoryMappingandosmium::util::TypedMemoryMapping. Use other constructor instead.
Version 2.17.1
Added
- Add
osmium_tags_filterexample showing use of tags filter. - Add
Writer::set_header()function to set header after constructing.
Changed
- Various improvements in PBF file reading make it slightly faster and less CPU intensive.
- Since 2.17.0 Osmium will, when reading files, tell the kernel using
fadvisethat it can remove pages from the buffer cache that are not needed any more. This is usually beneficial, because the memory can be used for something else. But if you are reading the same OSM file multiple times at the same time or in short succession, it might be better to keep those buffer pages. In that case you can set the environment variableOSMIUM_CLEAN_PAGE_CACHE_AFTER_READtonoand Osmium will not callfadvise. Set it toyesor anything else (or not set it at all) to get the default behaviour. - If the macro
OSMIUM_DEFINE_EXPORTis defined, all exception classes used by Osmium will get "tagged as exported" using__declspec(dllexport)when using MSVC or__attribute__ ((visibility("default")))on other compilers. This is needed in PyOsmium.
Fixed
- Fix integer parser. IDs in OPL files can now be anything between -2^63 and 2^63-1.
Version 2.17.0
Added
- Add "ids" output format. New IDS output format that is similar to the OPL format, but only the entity type and id is written out.
- Add convenience functions
left(),right(),top(),bottom()to accessosmium::Boxboundaries. - Add polygon output to WKB factory.
- Add functions to access storage from
node_locations_for_wayshandler. - Add flag
osmium::io::buffers_typefor telling theReaderclass whether you want buffers read to only contain a single type of OSM entity. - Add convenient named
nodes(),ways(), andrelations()accessor functions tonwr_arrayclass. - Add
DeltaDecode::value()accessor function. - Add variant of the
Buffer::purge_removed()function which doesn't take a callback parameter.
Changed
- Different varint decoding for faster PBF decoding. This makes PBF decoding about 15% faster.
- Several code optimmizations in (PBF) writer code that speed up writing of OSM files considerably while using less CPU and spreading the load on multiple CPUs.
- Use memset/memcpy instead of
std::fill_nandstd::copyin object builder for some slight speedups. - Ignore metadata setting on reader for history/change files. History and change files must be read with metadata, because otherwise the information is lost whether an object is visible or deleted. So ignore this setting in that case.
- On Linux: Use fadvise() to tell kernel about our reading patterns:
- Tell kernel that we are reading OSM files sequentially. This
should improve pre-fetching of data blocks. - Tell kernel that we are done with block so they can be released.
This means we don't hog the buffer cache for something that
will, in all likelyhood, not be needed any more.
- Tell kernel that we are reading OSM files sequentially. This
- Use assert() instead of exception in "can not happen" situation in the relations manager code.
- Various code cleanups.
Fixed
- Test failure with
add_tag_liston some systems. - Test framework fix for aarch64 architecture.
- Remove undefined behaviour in bzip2 compression code.
- Rename some local variables to not shadow member functions.
- Wrap
osmium::util::MemoryMapping::unmap()in try/catch on Windows also because we call this from a noexcept function. - Removed superfluous
std::forwards and fixed code that calledstd::forwardmultiple times on the same object. - Fix in OPL parser which could lead to invalid data being generated.
- Fixed three bugs in O5M parser which could lead to an infinit loop or segmentation faults.
Version 2.16.0
Added
- The PBF reader and writer now understand PBF blobs compressed with the LZ4 compression algorithm in addition to the usual ZLIB compression (or no compression at all). LZ4 is much faster to compress and uncompress. Use by setting the
pbf_compressionoutput file format option tolz4. You have to defineOSMIUM_WITH_LZ4to enable this before including any libosmium includes. - The function
osmium::io::supported_pbf_compression_typescan now be used to get a list of all PBF compression types supported. - The output file option
pbf_compression_levelcan now be set to an integer. The range depends on the compression type used, 0-9 for zlib compression and 1-65537 for lz4 compression. - Adds
ptr_begin()/ptr_end()functions toObjectPointerCollectionfor accessing the pointers instead of the underlying objects.
Changed
- The
osmium::io::Writer::close()function now returns the number of bytes written to an OSM file if it is available (and 0 otherwise). - Use stable sort when sorting
ObjectPointerCollection.
Fixed
- Various small fixes and cleanups.