osrm-backend/CHANGELOG.md
Siarhei Fedartsou 89b30b26e5 Squashed 'third_party/libosmium/' changes from d2c1d872b..cd892f98e
cd892f98e Release v2.20.0
e3de973e9 Disable false positive warning from GCC
938b98970 Optionally allow fractional seconds in timestamps
345d19054 Remove broken Appveyor build
8540bd4b5 Disable readability-convert-member-functions-to-static warning
8bda57bcc Fix some clang-tidy constness warnings
61d415bd8 Avoid C-style casts
4fa920809 Use default member initialization
e80a04c34 We do want macros for the version numbers
7b3ebb52a Make string global in test to avoid sanitizer errors
b904200aa Github actions: Disable "integer" sanitizer checks
d0c0741e4 Github actions: Disable dangling-reference warnings
2fcd1947d Github action: Cleanup build
8acce311b Github action: Use newer OS versions for builds
253b68795 Bugfix: Don't use class template arguments on constructor definition
58b313d3e Enable posix_fadvise usage on FreeBSD
d81d4c809 Github actions: Really disable stretch build...
a85834cf9 Github actions: Remove build on (unsupported) Debian stretch
94674ed90 Make parsing PBFs a bit less picky
f73731a1c Fix comment
5af0a4b48 Update README.md: Remove appveyor and codecov links
a44ae7be0 Release v2.19.0
d74ee5178 Update change log
af0e728c1 Update copyright date to 2023
3a76dfc4f Mark RapidJSON support as deprecated
866cdbdf1 Remove YCM config
752742ad3 Update included Catch to v2.13.10
c19fd7f16 Use PROJ_DATA in addition to PROJ_LIB
86c983378 Github actions: Cleanup
e6376a5aa Github actions: Update actions/upload-artifact to v3
2adf892d7 Github actions: Update config
146cc02f6 Github action: Update config
4e6ab3798 Revert "Remove deprecated functions in RelationsMapIndex"
7781aeb6f Remove deprecated functions in RelationsMapIndex
7314118a3 Remove deprecated BoolVector class
f6e6b1873 Remove deprecated NWRIdSet class
1676d386e Remove deprecated AssemblerConfig constructor
098f5f81e Remove comments referring to deprecated functions recently removed
4b3f18a9f Github actions: Disable Fedora 34 build
f8f54de13 Make conversion to double explicit
62b8ebe93 Various cleanups based on clang-tidy warnings
95016bf9c Use modern member initialization
3dc22331f Add lots of const's
7b9b68667 CMake config: Also check for newer clang-tidy versions
3ed568f74 Print start of offending string in overlong string exception
5663f7781 Github action: Build on Fedora 36 instead of 34
dcb34b53e Make bzip2 unit tests pass on musl-based systems
73d3594b7 Github action: Fix build on Ubuntu 22.04
a65d90902 Add lz4 library to AppVeyor build
a9416a981 Github actions: Build with Ubuntu 22.04 instead of outdated 21.04
4acdcfd40 Fix bug in members database test case
04506b22f Merge pull request #348 from AMDmi3/thread-name-freebsd
4d01c4f09 Implement set_thread_name() on FreeBSD
1fb34f931 Merge pull request #347 from a-balashov/master
6a34529d1 Fix return type.
5cec5e9c7 Fix compilation problem in example
9c50fde42 Release v2.18.0
8ab3ec47a Add a note in the source code about missing changeset id in CRC
d9264f597 Remove code that has been deprecated for a while
4ee289652 Update change log
50fe2b633 Formatting
a9ed5f93d Modernize some code
3cd09750a Rule of 5 for IdSetSmall
172f01b19 Use noexcept for move constructor/assignement
53ad0fa06 Remove OSMIUM_NORETURN macro
83002751c Use system_error instead of runtime_error where it fits better
35aecff32 Formatting fix
88c97620f Release v2.17.3
49d07bd8c Github actions: Give slow macOS machines more time
5971549fc Update change log
5aa70017c Update included Catch framework to v2.13.8
6683867cf Bugfix: Removed deadlock when shutting down active Reader
9c1cfc06b Update copyright date to 2022
481c77ed6 License file was renamed a couple of years ago
9e709fe3b Release v2.17.2
55f2a9423 Fix various formatting issues
9b94aa798 Fix detection of std::variant availability
97c6c282d Update change log
29b9ca1eb Use std::variant instead of boost::variant if available
5aea3bffb Add note about deprecated code to be removed to change log
67ca42393 Mark osmium::geom::CRS and Projection classes as deprecated
d7907274a Remove unused include
322fd9396 Don't install (deprecated) sparsehash on msys2 build
ac5a20e64 Github actions: Use lz4 library in CI builds
83af3efe7 Remove various workarounds for Windows compiler
156a4600f Github action: Also build benchmarks on Windows CI builds
38741c61e Bugfix: Possible dereference of invalid iterator in area assembler
0a51d0e69 Declare support of sparsehash based index deprecated
c7f136fb9 Remove dependency on boost::filter_iterator
a58a869c2 Disable clang-tidy warning
0af04dcf3 Add missing virtual destructors and use rule of 5
437461fa6 Add explicit explicit
da202152d Github actions: Add clang-tidy workflow (runs only on demand)
205ad0347 Various small cleanups based on clang-tidy findings
b6fed6b48 Avoid bugprone-implicit-widening-of-multiplication-result warning
8cad37cb8 Use `return` or `throw` instead of std::exit where possible
b89da1374 Various clang-tidy fixes
555918726 Better variable name
4e16fd340 Use explicit constructor
e51709efa Github CI: Also test on Windows 2022 (beta)
d8e4acba5 Do increment test together with copy constructor test
bbb0e169e Remove dependency on boost::indirect_iterator
5962b26be Github actions: Add Fedora 35 CI build
7180195f4 Github actions: Fix Debian testing gcc build
a3a1974c2 Switch from catch version 1 to catch2 as test framework
f031f8e26 Fix signed/unsigned comparisons
f3c8f86ab Get file size in Reader earlier, before we use fd in other thread
0d910154e Remove unused variables
d063e894b Bugfix: Do not read from queue that might be empty.
5c1d8d619 Modernize clang-tidy config
8e09b1c99 Pass by value and move std::string
56506a35f Github Actions CI: Remove build with thread sanitizer
68dbf631d Set timeouts on Github action workflows
346a92232 Remove superfluous buffer.commit()
d9167bfb9 Rework Github actions
b9582997d Fix stringop-overflow warning on GCC
5977dde02 Bugfix: Checking of ID order
44c05bf6f Add offending IDs to out-of-order exception messages
421814b3f Add more object comparison tests
090e70064 Workaround for GCC in C++17 mode
0901c5aee Set CMake minimum version to 2.8.12
ddce269e7 Remove unused includes/libraries from test
10520b3a9 Fix threading problem
ae90568c9 Make integer type conversion explicit
6ebfbb2a7 Revert "Make integer type conversion explicit"
ea58b8100 Replace std::forward with std::move for clarity
309fac854 Cast unicode literals in C++20
351209de9 Put two enum constants we are using together into same enum
e933414c1 Use std::invoke_result_t instead of std::result_of from C++17
134fcfb77 Use explicit casts from enum constants to double
568d7dee7 Make integer type conversion explicit
a11e77db1 Add missing initialization
a2c4f5031 Make some member functions static
f75e01e9f Make member functions static in examples
489e19dd1 Small cleanups in Reader
b6d6c5b90 Fix include order
aa684d06c Avoid warnign in CMake script for finding gem
78e28d1f5 Add Github sponsoring button
d124e2ea7 Release v2.17.1
30f5c4a95 Link to help.osm.org as further support option
f277d1379 Add github issue template
315709f08 Update change log
068c7405b Store offset in Reader directly from Decompressor
586d9fbb6 Make tracking of file size the responsibility of the Reader
5dcc2fe89 Mark page cache blocks as DONT_NEED later,
0cf064c8c Fix file_size()/offset() functions for PBF files
15d594fe6 Better implementation of integer parser for OPL parser
85633a023 Only set OSMIUM_EXPORT when OSMIUM_DEFINE_EXPORT is set
e2de86aff Add missing initializer in test
17f251c91 Add support for fadvise DONT_NEED to the PBF reader
313a3e598 Check env var OSMIUM_CLEAN_PAGE_CACHE_AFTER_READ
8a000cf89 Add option to use or not use fadvise in decompressors
7f9c48654 Read PBF files without an extra thread
cd7d5fa45 Add osmium_tags_filter example showing use of tags filter
b4901a312 Use newest version of gdal.hpp
02d26a97e Mock out OSMIUM_EXPORT macro for header checks
5d50405a8 Explicitly export exception types.
4bdb688c0 Remove Ubuntu 16 CI runs
f94e1218d Use #ifdef instead of #if to check if a macro is set
19d4e5f46 Allow integers with up to 18 digits in OPL parser
7316c657e Rename confusing variable name
8f5a85235 Remove unnecessary int -> double -> int conversion in PBF output
e970573a4 Add Writer::set_header() function to set header after constructing
9d5b890f7 Do not try to compile osmium/geom/projection.hpp without proj lib
c95404d78 Make compile/test with proj lib optional
5e8e6630d Github actions: Remove broken coverage workflow
111529b3c Do fewer string allocations in PBF reader
daae73d58 Check OSMIUM_USE_POOL_THREADS_FOR_PBF_PARSING env var only once
b263ba5e8 Release v2.17.0
d484726ed Update the notes for developers
e0045079a Update change log
7e0a0867f Cleanup and some new asserts for o5m parser code
66c5efe2f Bugfix: Another OPL parser bug
a4a57b1d6 Bugfix: Access beyond end of buffer in OPL parser
4dd1f9a11 Bugfix: Avoid integer overflow in o5m parser
c236ceb5d Update to newest osm-testdata submodule
f17bd7af9 Bugfix: OPL parser stumbled on "%%" in text
f8d031311 Add value accessor function to DeltaDecode class
3d88936fb Fix msys2 build
56b023608 Add convenient access functions to nwr_array
aa88c1c3c Add version of osmium::memory::Buffer::purge_removed without callback
dd2788554 Update change log
5702748fc Disable clang-tidy check that has false positives
b36d6c998 Code cleanup
44c6286a8 Avoid type confusion on Windows
d5aa671c0 Github actions: Install missing compilers
d6ea0da09 Fix failing test missing initializer
58839058f Add flag osmium::io::buffers_type for Reader
ef6f0a614 Remove code duplication in OSM file input parsing
ae936b158 Add recent changes to changelog
61da2e4e2 Add Github action GCC 10 Dev build
fa152fb8b Disable spurious warning generated by GCC >=8
bffdb24a5 Revert "Disable spurious warning generated by older gcc versions"
cb35dd02a Rename variables to avoid shadowing other function/variable names
2a929cc19 Tinker with cppcheck warning suppression
c81e76595 Reference parameter can be const
b6fc08347 Reduce scope of "visible" variable
b6e211116 Use shared_ptr instead of unique_ptr
8a78ac477 Disable clang checks about global variables in some tests
06a1efc9b Disable spurious warning generated by older gcc versions
39a518a93 Remove github actions Windows workflow
445fc4ecd Add "ids" output format
69ab990f3 Better bucket_count tracking without global
8a9679c3e Move more of the pbf serialization code into pool threads
5ced435b9 Cleaner implementation of PrimitiveBlock that doesn't need reuse
770cd8a89 We don't need the type() function
7cdf0765e We know how many nodes there usually are in a DenseNode block
f81469d63 Make a copy of the output options in the PrimitiveBlock
1cfe4818f Don't use references as class members
c488a14d1 Use DenseNodes only when needed in PrimitiveBlock
d38d6635c Move SerializeBlob class down in the file
953fdd57f Remove superfluous std::move()
9bb70f968 Optimization: Wrap check for future in atomic bool check
e9ab79c39 Use memset/memcpy instead of std::fill_n and std::copy
d24ca6b77 Different varint decoding for faster PBF decoding
1b24ed181 Adapt cppcheck suppression for newer cppcheck versions
bc915d487 Bugfix: Can't use std::forward multiple times on the same object
4679374a9 Remove superfluous std::forwards
b8fcdfbf8 std::forward not needed
4e406564a Can't use std::forward twice on a parameter
0d5d92ab8 Can't use std::forward twice on a parameter
f75faf2e8 Avoid strange segfault on Windows
b81deee17 Remove Windows build on Github actions
9543c8898 Correct formatting for cppcheck supression
f3bdabde7 Remove unnecessary test
77a5d0b15 Sprinkle some const's around the code
644efeaa7 Use assert instead of exception in "can not happen" situation
d9b1c12c8 Use const buffer (because we can)
f79e46d86 Wrap unmap() in try/catch on Windows also
b8621fb78 lat/lon_without_check() can be noexcept
7302bcc6d Rename some local variables to not shadow member functions
aaa983625 Fix functions accessing borders of box (noexcept)
36c4cc2d8 Another call to posix_fadvice() that should only happen on Linux
016305de6 Check we don't have a negative offset before calling fadvise
c3e877e0e Only call posix_fadvise() on Linux
94a5c9063 Use fadvise to tell kernel about our reading patterns
6a4f553a6 Add functions to access storage from node_locations_for_ways handler
3aef811e2 Add polygon output to WKB factory
04720be8c Add convenience functions to access box boundaries
1705adb8a Remove undefined behaviour
072612ab9 Ignore metadata setting on reader for history/change files
d7a880873 Update docs related to read_meta setting
336001aba Merge pull request #321 from fxcoudert/patch-1
c587e53e8 Update catch.hpp
b293e96db Fix: Test failure because of ordering by address, not string
46c063928 Release v2.16.0
a91eac694 User cmake helper for finding LZ4
6009389e3 Disable data test because it doesn't work (No Spatialite in OGR)
4160d2378 Update CI workflow
6318f51fa Remove old build.bat
78ac3abda Disable some clang-tidy warnings
efcebbfe5 Use simple return instead of std::exit
b5cec1a9b Avoid else after return
2fb593a56 CMake config: Update list of clang-tidy versions we look for
c2da87d08 Update change log
54894fdbb Make number of bytes written to an OSM file accessible from Writer
0e47ca0d2 Use std::stable_sort instead of std::sort in area assembler
3d5c90750 Add function to show supported pbf compression types
d22b419c9 Do not use pkg-config to find LZ4 library
366c3f5ac Make pbf_compression into an enum class
87e492aad Replace unordered_set by vector
9ca43812a Fix broken comment
ce88a2a08 Use proper name "macOS"
6cec53471 Update copyright date
2c9ab8627 Only try to compile lz4 code if it is enabled
9be3779b1 Make zlib_default_compression_level() function constexpr
4d629c91b Error out if zstd compressed data is detected in a PBF file
e3a8b2af4 Add support for LZ4 compression in PBF files
78f70e50c Prepare for more (optional) PBF compression types
5cd5bd6f6 Add support for setting zlib compression level when writing PBF files
23d662260 Add optional compression_level parameter to zlib_compress()
f077b8351 Add lz4_data and zstd_data fields in protobuf Blob message
35939b2cc Make some file helper functions noexcept
b74047957 Update submodule
cce503a44 Add some casts in CRC code to avoid undefined behaviour
5e72f050f Make timer class member functions non-static again
729b0317b Replace two timers by a single one, we only ever use one or the other
98268aa95 Switch from Travis CI to github actions
6c4ee8b6b Fix appveyor build
91350d7cd Iterate over const ref to avoid copy
0e14ef635 Fix cast so we don't get UB
26144743b Array iterator isn't necessarily a pointer
1109d7347 Range-for loop iterates over values not references in this case
ce09cb7b8 Also check for clang-tidy versions 11 and 12
fd106ff08 Disable some clang-tidy checks
2bee7dd34 Avoid const return values so automatic move will work
fe3f00dad Make member functions const if possible
a82bc94f6 Use member initializer where possible
c757a1d5f Always initialize variables even if not strictly necessary
efd7e0799 Make some member functions static
89134cafb Use qualified auto where it makes sense
a1cbd7cd2 Merge pull request #314 from tomhughes/dependency
ec65b9f44 Fix typo in test dependency
c965256e3 Derive exception class from std::exception
4352b68ca Mark overridden destructors as override
3f64f0189 Add some documentation around the use of the thread pool
be04b4d58 Use stable sort when sorting ObjectPointerCollection
1bd2059f2 Release v2.15.6
378305f4c Avoid wrong integer promotion
9fc63bc5e Update change log
ae649700c Quick fix: Restrict recursion depth to 20 when building areas
e9368b642 Add getter function for object_id to problem reporter
9599aa447 Mark classes as final instead of individual member functions
e076b6d27 Add IdSetSmall::merge_sorted function
fd7b1e9c9 Little optimization for IdSetSmall
69113a832 Release v2.15.5
1af498ad6 Update change log
312a537c9 Update travis config according to the newest fashion
a5f61f66f Revert "Remove YCM config"
4db1ab3c0 Mark projection classes using PROJ library as deprecated
dae2898db Revert "Also support API of modern PROJ library (version 6 and above)"
2c9ea591a Revert struct initialization because old GCCs don't like it
c2d4734d7 Various small cleanups
f960e9c5f Update change log
d0cd61337 Make OPL parser more strict: Attributes can only be specified once
d5a76e635 Also support API of modern PROJ library (version 6 and above)
cd580daae Remove YCM config
531828135 Merge pull request #304 from zhaitianduo/master
3fa9a2f47 Stick to west const convention
42fc3238f fix parsing lat bug from pbf densenode
a2df9f058 Make available_space() always return 0 on Windows
00471e02c Merge pull request #303 from CloudNiner/patch-1
fb305564a Fix location attr variable name typo
e532f5938 Add additional constructor for member_type(_string) taking char type
872338442 Add iterator to nwr_array
2709257c3 Check how much space is available in file system before resizing file
c8920d819 Disable our own deprecation warning when checking our headers
392f31c87 Update copyright date
51d15f8bd Document that location and box parameters are WGS84
01bf91a45 Bugfix: Do not close stdout after writing OSM file to it
31cc17dc4 TagMatcher now remembers whether it has a value matcher.
0bb6f48b2 Simpler emptyness test.
a2baf014e Split up large test cases.
e571f87fb New builder::attr::_t() function to set tags from comma-separated string
a9793a429 Doc fix: Not a question.
2010af4d1 Remove unused header include
f56d7a2ef cleanup code
07589f471 Allow single C string or std::string as argument for _tag.
cf5d3b2b0 Make distance function noexcept and use std versions of math funcs
3c605280f Make two almost identical overloads of haversine for pyosmium
7d85f5538 Make haversine function take a NodeRefList instead of WayNodeList
a43ffb61c Release v2.15.4
a77b99dbd Various small code improvements in area assembly code.
13ba60cb7 Reduce memory consumption in area builder
2e1d7f05b Keep track of recursion depth in area builder.
e8a7d81eb Make debug output for complex multipolygons slightly more verbose.
23c7341de Revert "Travis: Also try building on ARM."
49f8c54c7 Travis: Also try building on ARM.
e0bc0e55e Travis: Remove failing old OSX build.
a83406e45 Add osmium::Options::empty() for consistency with STL containers.
8fb753a6f Release v2.15.3
5eea80c50 New header option "sorting" when reading and writing PBFs.
46a6e4399 Bugfix: Do not propagate C++ exception through C code.
c47366d3f Release v2.15.2
1c5762f65 Change member variable init to make GCC 4.8/4.9 happy.
2503f94c9 Initialize array.
e2c10a1b3 Use std::array for nwr_array class.
8c95a6605 Workaround for old compiler.
91d63d1a5 Use larger int so we don't get narrowing conversion warnings.
96d963155 Make clang-tidy happy.
180ad2e0c Bugfix: Call parent constructor in IdSetDense copy constructor.
d0554c9d4 Add swap, copy constructor and assignment operator to IdSetDense.
b30715ed8 Retire use of OSMIUM_NORETURN macro. Use [[noreturn]] instead.
12e5f69ad Make wrapper class constructor explicit.
aeb514563 Update included catch.hpp to 1.12.2.
07322bd94 Update change log.
1bd037197 The apply function can now also take lambdas.
618e4af0a Fix Appveyor badge.
162694bda Merge pull request #285 from tusharpm/appveyor_fix_msys
820798c6a Use workaround for spatialite - readline
c3e05d977 Travis: Better homebrew config and also run on OSX 11.
6df0bbea8 Fold one-liner function only used once into code at call site.
e7f1f0ccc Make member functions of Timer class non-static again.
0204aa980 Remove assert, because check is not needed.
e3e60312a Revert "Use ftruncate64 instead of ftruncate."
9fa018323 Enable use of the old proj API in proj version 6.
9d046b4c8 Use ftruncate64 instead of ftruncate.
1a7654b05 Make some member function static.
98ce21919 Disable more clang-tidy warnings.
ba8502702 CMake config: Also look for clang-tidy-10.
90391c15a Use explicit cast and document why it is okay.
ebc5164f7 Disable narrowing conversion warning here.
1b4bbcb37 Make it clear that we are intending a conversion to double here.
cbe2e2f3e Build some of travis builds on dist bionic.
e7e4031ff Fix integer conversion algorithm.
c664fc4be Disable another clang-tidy warning.
df23ce407 Disable overstrict clang-tidy warning.
39e69d7b7 Use const ref instead of value parameters.
42e480430 Disable clang-tidy avoid-c-arrays checks.
032ee4c31 Use std::array instead of C style arrays.
60b936229 Use uppercase letters for integer literal suffixes.
f0e7d1281 Disable clang-tidy checks.
accb19c6e Disable clang-tidy check in test.
d0ebf2668 Disable clang-tidy warning cppcoreguidelines-avoid-magic-numbers.
bbbb246ef Replace c-style arrays by std::array in some places.
631e39c12 Use uppercase letters for integer literal suffixes.
c59fac3d7 Give name to unused function parameters to make clang-tidy happy.
91151ad52 Remove const from return types because it doesn't do anything.
49dea1c31 Do not use multiple declarations on a single line (readability).
90115a5bd Do not return pointer to local string.
546681234 Also look for newer clang-tidy versions in CMake config.
5858c491a Better error messages when parsing a timestamp fails.
5c06fbb60 Ignore <bbox> or <bounds> subelement of <way> or <relation>.
90f26c772 Document that valid values must be used for projections.
65a75b7d2 Make some compilers happy.
7d82a43aa Do not build areas with more than 100 locations where rings touch.
f3003e774 Fix wrong comment.
35f184f08 Release v2.15.1
3553d03bd Update copyright date to 2019.
ffa35e0c2 Appveyor config: Move the slow MSYS2 compilation to the back.
d6024a9d6 Update change log.
10ecb1335 Fix bugprone-forwarding-reference-overload clang-tidy warnings.
b66bc888d Disable bugprone-macro-parentheses clang-tidy check.
40bf6614e Switch appveyor badge
c19e26906 Disable a warning on new GCC compilers.
28c753846 Fix signed bitwise operation.
1304ad246 Bugfix: Function is not noexcept.
ce5867ea1 Put try/catch around most of main() in benchmark and test programs.
bfe1c5384 Fix exception specifications.
6c1ade020 Put try/catch around most of main() in example programs.
345359a2a Bugfix: Integer truncation on 32 bit systems.
7b66ff706 Fix or disable some clang-tidy warnings.
538e0f52f Bugfix: correctly throw exception.
c582ebdcf CMake config: also find clang-tidy-7.
0ec6cda55 Add some assertions testing alignment.
e40fc3ff0 Cheat compiler so we don't get a warning.
882f01e64 Compile with NDEBUG in RelWithDebInfo mode.
9600bcdaf Merge pull request #275 from Nakaner/test_dump_as_list
0e9344f9b replace std::bind by lambdas, replace hardcoded type
8e8a4dbd8 test Map::dump_as_list
a70e4accb Merge pull request #274 from Nakaner/index-test-cleanup
aa2555ef5 fix typo
b48567a17 test SparseMmapArray as well
825859f9d Release v2.15.0
bde2d0024 Give Buffer a better move constructor and move assignment.
0bd61ba95 Some cleanup.
a46ea362b Fixed some clang-tidy warnings.
5c9d3c2de Add function to mark tags on OSM objects as removed.
da5f083c7 Make chunk_bits in IdSetDense configurable.
e5600bbc6 Make the result type of TagsFilter configurable.
b107e964b Some code cleanup.
99ea830e0 Use explicit type instead of auto.
baff26c29 More efficient use of Buffers in XML/OPL/O5M parsers.
6e4fc2ed3 Various formatting fixes and small cleanups.
dc5d08d54 Consolidate queue config code.
2a336d445 Update change log.
968f88152 Stackless implementation of Reader.
7b14860ff Formatting.
1dd2a9f1f Tweak buffer size for PBF decoder.
d11ab7db2 Make grow_internal a private method.
a8737494c Fix default initialization of Buffer.
f6b98df70 Rewrite initializer of unique_ptr.
1efcc32e8 Remove redundant get() call.
bef66b861 Experimental code using nested buffers to reduce memory consumption.
2302da299 Clean up error handling code of bzip compression.
67786d98c Clean up error handling code of gzip compression.
dd507e322 Move coverage settings before configuration type settings.
07162475f Fix windows build.
e1912a8c2 Also implement compression tests for writer side.
16d7800a3 Remove two const_casts.
a5e3bd8af Cleanup of compression code and more tests.
f42e68745 Fix typo.
a1f88fe44 Update travis config to xenial.
5bb5db6a3 Disable clang-tidy warning.
4af366a30 Move appveyor config to new Visual Studio version.
75fc34c0b Revert use of some enums (because of problems with MSVC).
86e9d4393 Use enums for some more constants.
392347512 Force underlying type for some enums.
f4ecfc9fe Disable some clang-tidy warnings.
09d785414 Reduce the number of builds on travis.
2056202de Merge pull request #273 from Nakaner/test-missing-rel-member
ba511d204 Use enums for integer constants.
59ebb9120 Use const where possible.
5f9ac226c Fix formatting.
f5e996670 Use enums for integer constants.
4280437be Remove unused enum names.
76bbf25b2 Test that RelationsManagerBase::get_member_object returns nullptr
091a75f5a Hardcode %lld format instead of using <cinttypes> PRI macro.
d6abc4dd7 Travis: Also build with gcc 7.
fdf45be5d Update travis conf with newer OSX builds.
e4b3d8f31 CMake config: Fatal error with better message if libosmium isn't found.
0632d6007 Formatting/Cleanup.
b190b95e5 Set the xml_josm_upload header option when reading XML files.
4a3cbe0f1 Disable docker builds on travis. They are being phased out by travis.
a5cb873bc Sort includes.
0e4c57a09 Merge pull request #271 from DennisOSRM/patch-2
13dfd56e1 Minor: Wrong order of qualifiers
1bb69ec62 Code cleanup.
54ae75658 Merge pull request #269 from Nakaner/dump_sparse_as_array
bb1a4e3e8 make const what can be const
d44c79a5e remove duplicated initialization with empty values
c2ef6a67e also test SparseMemArray and don't test SparseMmapArray on OS X
31f10bb2f add comments and check all entries in the index
c30845bcf code style issues
5ff69d536 use std::fill_n
78939b47a remove unnecessary variable
93e747244 style fixes
a76385a2e simplify test
364830df3 use a simpler loop
393be1270 fix code style issues, use std::unique_ptr instead of bare pointers
309e890bf write empty values during each iteration
0aa4c914e Update to newest gdalcpp.
6fea0e82a tidy up unit test
d0fce0ac3 don't confuse the number of elements and the size of the array
98923b8bb MinGW appveyor build is broken again. Try this workaround again.
d9c7e25e0 Merge pull request #266 from Nakaner/dump_and_load_index_test
ccbcea885 use better name for variable
d91f9c8a1 Make sure assert() is not defined in test.
f8dc3aad4 implement SparseMmapArray::dump_as_array
02b2ebde1 Add DenseMemArray and run DenseMmapArray only on Linux
8ba350a9b use the file index, not the mmaped index
15f215095 add unit test checking dumping and loading of dense indexes
2d5244a24 Remove workaround.
058cd3a36 Release v2.14.2
ff16782fb Rewrite code to be byte-order independent.
c7e76743a Add workaround for gdal problem on MinGW appveyor build.
75d1b48b1 Remove test that doesn't work reliably on all architectures.
269066889 Release v2.14.1
f21bf5738 Write assert in a way it also works on 32 bit machines.
748917839 Refactored some SECTIONs from test cases into TEST_CASEs.
3af83c68a Fix a WKB test which was too sensitive to tiny arithmetic errors.
a198b06ba Update change log.
3dfc97fc2 Split up large test cases.
4cae84b1d Add missing includes.
dd2a0caf8 Use auto after static_cast to avoid duplication of type.
6fdda54ae Use our internal functions for writing out locations in box output.
060b0ec59 Use unsigned in bit operation.
bd8b76eee Remove utfcpp library from libosmium.
467e1a1f1 Add UTF8 to Unicode codepoint conversion.
68c981313 Use our own function for unicode codepoint to tf8 conversion.
2a35ad727 Use protozero::byteswap_inplace instead of htonl/ntohl.
452f56e87 Add Timestamp::to_iso_all() function which also outputs the 0 value.
5f6638f88 Ask for the newest Protozero version.
b9886c58b Do a static_cast to avoid compiler warnings.
954b9e5a4 Move test case SECTIONs into their own TEST_CASEs.
be99d53ef Add some asserts, docs, and noexcepts.
6ce3bcb10 Replace some SECTIONs by TEST_CASEs in test code.
05841f16f Disable the last clang-tidy warning we are seeing.
e16b4ad1e Disable warning about struct initialization.
d7e033672 Correct way to disable clang-diagnostic warning in clang-tidy.
f60c8fa0a Proper initialization.
6aa3929e1 Resolve some clang-tidy reports.
5bb84716d Mark static_cast_with_assert as deprecated.
e51b8e3af Remove remaining use of static_cast_with_assert.
d19d97c46 Refactor StringTable to minimize casts needed.
cbf0c6e1a Fix naming of member functions that are not found by doxygen.
cd3a18a53 Add support for using the CRC32 implementation from the zlib library.
874a79133 Document use of mutable in DiffIterator class.
07985a68e Fix compilation error when fileno() is a macro.
eee3d0af6 Use https links where possible.
6465f9ff2 Use https URL for osmcode.org.
60b3bcc16 Make two functions noexcept.
ff160aa30 Add clear_user() function to OSMObject and Changeset.
63a6cf4b4 Use {} for constructors.
47b66ed46 Merge pull request #255 from DennisOSRM/patch-1
3e015b4c7 Make sure -stdlib=libc++ is only set on Mac when compiling with Clang
7674775c1 Document MultipolygonCollector class as deprecated.
e114fefb9 Travis: build with clang 6.0, remove clang 4.0
8be488572 CMake config: Also look for clang-tidy version 7.
2e7eb285e Fix namespace closing comment.

git-subtree-dir: third_party/libosmium
git-subtree-split: cd892f98e8e355f5d0a4b717c153c7de0d15bb0d
2024-07-13 14:22:42 +02:00

53 KiB

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

unreleased -

Added

Changed

Fixed

2.20.0 - 2023-09-20

Changed

  • Optionally allow fractional seconds in timestamps in OSM files.
  • Enable posix_fadvise usage on FreeBSD.
  • Make parsing PBFs a bit less picky.
  • Various small code cleanups.

Fixed

  • Don't use class template arguments on GeometryFactory constructor definition.

2.19.0 - 2023-01-19

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.

2.18.0 - 2022-02-07

Changed

  • Use system_error instead of runtime_error where it fits better.
  • Remove OSMIUM_NORETURN macro. 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::SparseMemTable as well as the complete file osmium/index/map/sparse_mem_table.hpp.
  • Callback functionality of the osmium::memory::Buffer class. The set_full_callback() will not be available any more. See the source for replacement options.
  • Various osmium::builder::build_* functions in osmium/builder/builder_helper.hpp. Use osmium::builder::add_* functions instead. Removes builder_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(). Use set_user() instead.
  • osmium::builder::ChangesetBuilder::bounds() returning a modifiable reference. Use set_bounds() instead.
  • Several functions around osmium::io::OutputIterator.
  • osmium::Area::inner_ring_cbegin/cend(), use inner_rings() instead.
  • osmium::RelationMember::ref(), use set_ref() instead.
  • Implicit conversion from osmium::Timestamp to std::time_t. Use seconds_since_epoch() instead.
  • osmium::string_to_user_id(), use string_to_uid instead.
  • osmium::static_cast_with_assert() helper functions as well as the complete include file osmium/util/cast.hpp.
  • Some constructors of osmium::util::MemoryMapping and osmium::util::TypedMemoryMapping. Use other constructor instead.

2.17.3 - 2022-01-19

Fixed

  • Removed possible deadlock when shutting down active Reader.

2.17.2 - 2021-12-16

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::variant is available (C++17 and above), libosmium will use that instead of boost::variant reducing the dependencies a little bit.
  • Removed various workaround that were needed for older MSVC compilers.
  • Remove use of boost::filter_iterator and boost::indirect_iterator. The removes the dependency on Boost Iterator.
  • Examples now mostly use the somewhat cleaner return instead of std::exit() to return an exit code from main.
  • As always: Various small code cleanups.

Fixed

  • When ordering OSM objects (mostly use in the CheckOrder handler), 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::SparseMemTable as well as the complete file osmium/index/map/sparse_mem_table.hpp.
  • Callback functionality of the osmium::memory::Buffer class. The set_full_callback() will not be available any more. See the source for replacement options.
  • Various osmium::builder::build_* functions in osmium/builder/builder_helper.hpp. Use osmium::builder::add_* functions instead. Removes builder_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(). Use set_user() instead.
  • osmium::builder::ChangesetBuilder::bounds() returning a modifiable reference. Use set_bounds() instead.
  • Several functions around osmium::io::OutputIterator.
  • osmium::Area::inner_ring_cbegin/cend(), use inner_rings() instead.
  • osmium::RelationMember::ref(), use set_ref() instead.
  • Implicit conversion from osmium::Timestamp to std::time_t. Use seconds_since_epoch() instead.
  • osmium::string_to_user_id(), use string_to_uid instead.
  • osmium::static_cast_with_assert() helper functions as well as the complete include file osmium/util/cast.hpp.
  • Some constructors of osmium::util::MemoryMapping and osmium::util::TypedMemoryMapping. Use other constructor instead.

2.17.1 - 2021-10-05

Added

  • Add osmium_tags_filter example 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 fadvise that 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 variable OSMIUM_CLEAN_PAGE_CACHE_AFTER_READ to no and Osmium will not call fadvise. Set it to yes or anything else (or not set it at all) to get the default behaviour.
  • If the macro OSMIUM_DEFINE_EXPORT is 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.

2.17.0 - 2021-04-26

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 access osmium::Box boundaries.
  • Add polygon output to WKB factory.
  • Add functions to access storage from node_locations_for_ways handler.
  • Add flag osmium::io::buffers_type for telling the Reader class whether you want buffers read to only contain a single type of OSM entity.
  • Add convenient named nodes(), ways(), and relations() accessor functions to nwr_array class.
  • 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_n and std::copy in 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:
    1. Tell kernel that we are reading OSM files sequentially. This should improve pre-fetching of data blocks.
    2. 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.
  • Use assert() instead of exception in "can not happen" situation in the relations manager code.
  • Various code cleanups.

Fixed

  • Test failure with add_tag_list on 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 called std::forward multiple 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.

2.16.0 - 2021-01-08

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_compression output file format option to lz4. You have to define OSMIUM_WITH_LZ4 to enable this before including any libosmium includes.
  • The function osmium::io::supported_pbf_compression_types can now be used to get a list of all PBF compression types supported.
  • The output file option pbf_compression_level can 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 to ObjectPointerCollection for 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.

2.15.6 - 2020-06-27

Added

  • Add IdSetSmall::merge_sorted function.

Changed

  • Little optimization for IdSetSmall: Don't add the same id twice in a row.

Fixed

  • Do not build areas with "recursion depth > 20". This happens when there are complex multipolygon with many rings touching in single points. This is a quick fix that hopefully keeps us going until we find a better solution.

2.15.5 - 2020-04-21

Added

  • Additional constructor for builder::attr::member_type(_string) taking char type making it even easier to generate test data.
  • Allow single C string or std::string as argument for builder::attr::_tag. Must contain key and value separated by the equal sign.
  • New builder::attr::_t() function to set tags from comma-separated string.
  • New nwr_array iterator.
  • Support for the PROJ library has now been declared deprecated. The old PROJ API (up to version PROJ 6) is currently still available, but will be removed in a future version. Support for the new PROJ API will not be in libosmium. See https://github.com/osmcode/osmium-proj for some code that might help you if you need this.

Changed

  • Check how much space is available in file system before resizing memory mapped file (not on Windows). This means we can, at least in some cases, show an error message instead of crashing the program.

Fixed

  • Parsing coordinates in PBF files did not work correctly if an lat/lon offset was specified (which almost never happens).
  • Make OPL parser more strict: Attributes can only be specified once.
  • Do not close stdout after writing OSM file to it.

2.15.4 - 2019-11-28

Added

  • Add osmium::Options::empty() for consistency with STL containers.

Fixed

  • Massive reduction of memory consumption in area assembly code. For some very complex polygons memory usage can drop from multiple gigabytes to just megabytes.

2.15.3 - 2019-09-16

Added

  • New header option "sorting" when reading and writing PBFs. If the header option "sorting" is set to Type_then_ID, the optional header property Sort.Type_then_ID is set on writing to PBF files. When reading PBF files with this header property, the "sorting" header option is set accordingly.

Fixed

  • Do not propagate C++ exception through C code. We are using the Expat XML parser, a C library. It calls callbacks in our code. When those callbacks throw, the exception was propagated through the C code. This did work in the tests, but that behaviour isn't guaranteed (C++ standard says it is implementation defined). This fixes it by catching the exception and rethrowing it later.

2.15.2 - 2019-08-16

Added

  • Instead of handler classes, the apply function can now also take lambdas (or objects from classes implementing operator()).
  • Add swap, copy constructor and assignment operator to IdSetDense.

Changed

  • Enable use of the old proj API in proj version 6. This is a stopgap solution until we find a better one.
  • Better error messages when there is an error parsing a timestamp.
  • Cleaned up a lot of code based on clang-tidy warnings.
  • Ignore or subelement of or . elements are created by Overpass API as subelements of ways or relations when the "out bb" format is used. subelements turn up in files downloaded from http://download.openstreetmap.fr/replication . Libosmium used to throw an error like "Unknown element in : bbox". With this commit, these subelements are ignored, ie. there is no error any more, but the data is not read.
  • Add swap, copy constructor and assignment operator to IdSetDense.
  • Update included catch.hpp to 1.12.2.
  • Retire use of OSMIUM_NORETURN macro. Use [[noreturn]] instead.

Fixed

  • Do not build areas with more than 100 locations where rings touch. Places where rings touch are unusual for normal multipolygons and the algorithm in libosmium that assembles multipolygons does not handle them well. If there are too many touching points it becomes very slow. This is not a problem for almost all multipolygons. As I am writing this there are only three relations in the OSM database with more than 100 touching points, all of them rather weird boundaries in the US. With this commit libosmium will simply ignore those areas to keep the processing speed within reasonable bounds.

2.15.1 - 2019-02-26

Added

  • More tests.
  • CMake config: also find clang-tidy-7.

Changed

  • Example and benchmark programs now don't crash with exceptions any more but report them properly.

Fixed

  • Compile with NDEBUG in RelWithDebInfo mode.
  • Correctly throw exception in multimap::dump_as_list().
  • Integer truncation on 32 bit systems in MemoryUsage.
  • Exception specification on some functions.
  • Forwarding references that might have hidden copy/move constructors.

2.15.0 - 2018-12-07

Added

  • Function dump_as_array() to dump sparse array indexes.
  • Set the xml_josm_upload header option when reading XML files.
  • New function OSMObject::remove_tags() marks tags on OSM objects as removed.
  • More tests.

Changed

  • When reading OSM files Libosmium now has less memory overhead, especially when reading PBF files. This works by using more, but smaller buffers.
  • The TagsFilter class is now based on the TagsFilterBase template class which allows setting the result type. This allows the filter to return more data depending on the rule that matched.
  • Use enums for many constants instead of (static) const(expr) variables.
  • Make chunk_bits in IdSetDense configurable.
  • Hardcode %lld format instead of using <cinttypes> PRI macro.
  • Update included gdalcpp to version 1.2.0.

Fixed

  • The gzip/bzip2 compression code was overhauled and is better tested now. This fixes some bugs on Windows.

2.14.2 - 2018-07-23

Fixed

  • PBF reader and writer depended on byte order of system architecture.
  • Removed an unreliable test that didn't work on some architectures.

2.14.1 - 2018-07-23

Changed

  • Libosmium now needs the newest Protozero version 1.6.3.
  • Removes dependency on the utfcpp library for conversions between Unicode code points and UTF-8. We have our own functions for this now. This also gives us more control on where errors are thrown in this code.
  • Add support for using the CRC32 implementation from the zlib library in addition to the one from Boost. It is significantly faster and means we have one less dependency, because zlib is needed anyway in almost all programs using Osmium due to its use in the PBF format. Set macro OSMIUM_TEST_CRC_USE_BOOST before compiling the tests, if you want to run the tests with the boost library code, otherwise it will use the zlib code. Note that to use this you have to change your software slightly, see the documentation of the CRC_zlib class for details.
  • Add a clear_user() function to OSMObject and Changeset which allows removing the user name of an entity without re-creating it in a new buffer.
  • In Osmium the 0 value of the Timestamp is used to denote the "invalid" Timestamp, and its output using the to_iso() function is the empty string. But this is the wrong output for OSM XML files, where a timestamp that's not set should still be output as 1970-01-01T00:00:00Z. This version introduces a new to_is_all() function which will do this and uses that function in the XML writer.
  • Use protozero::byteswap_inplace instead of htonl/ntohl. Makes the code simpler and also works on Windows.
  • Marked MultipolygonCollector class as deprecated. Use the MultipolygonManager class introduced in 2.13.0 instead.
  • Lots of code cleanups especially around asserts. Libosmium checks out clean with clang-tidy now. Some documentation updates.

Fixed

  • Fix compilation error when fileno() is a macro (as in OpenBSD 6.3).
  • Make Box output consistent with the output of a single Location and avoids problems with some locales.

2.14.0 - 2018-03-31

Added

  • Add ReaderWithProgressBar class. This wraps an osmium::io::Reader and an osmium::ProgressBar into a nice little package allowing easier use in the common case.
  • Add polygon implementation for WKT and GeoJSON geometry factories. (Thanks to Horace Williams.)
  • Various tests.

Changed

  • Add git submodule with osm-testdata repository. Before this the repository had to be installed externally. Now a submodule update can be used to get the correct version of the osm-testdata repository.
  • The XML file reader was rewritten to be more strict. Cases where it could be tricked into failing badly were removed. There are now more tests for the XML parser.
  • Replaced strftime by our own implementation. Uses a specialized implementation for our use case instead the more general strftime. Benchmarked this to be faster.
  • Changed the way IDs are parsed from strings. No asserts are used any more but checks are done and an exception is thrown when IDs are out of range. This also changes the way negative values are handled. The value -1 is now always accepted for all IDs and returned as 0. This deprecates the string_to_user_id() function, use string_to_uid() instead which returns a different type.
  • It was always a bit confusing that some of the util classes and functions are directly in the osmium namespace and some are in osmium::util. The osmium::util namespace is now declared inline. which allows all util classes and functions to be addressed directly in the osmium namespace while keeping backwards compatibility.
  • An error is now thrown when the deprecated pbf_add_metadata file format option is used. Use add_metadata instead.
  • Extended the add_metadata file format option. In addition to allowing the values true, yes, false, and no, the new values all and none are now recognized. The option can also be set to a list of attributes separated by the + sign. Attributes are version, timestamp, changeset, uid, and user. All output formats have been updated to only output the specified attributes. This is based on the new osmium::metadata_options class which stores information about what metadata an OSMObject has or should have. (Thanks to Michael Reichert.)
  • The < (less than) operator on OSMObjects now ignores the case when one or both of the timestamps on the objects are not set at all. This allows better handling of OSM data files with reduced metadata.
  • Allow version = -1 and changeset = -1 in PBF input. This value is sometimes used by other programs to denote "no value". Osmium uses the 0 for this.
  • The example programs using the getopt_long function have been rewritten to work without it. This makes using libosmium on Windows easier, where this function is not available.
  • Removed the embedded protozero from repository. Like other dependencies you have to install protozero first. If you check out the protozero repository in the same directory where you checked out libosmium, libosmium's CMake will find it.
  • Various code cleanups, fixing of include order, etc.
  • Remove need for winsock2 library in Windows by using code from Protozero. (Thanks alex85k.)
  • Add MSYS2 build to Appveyor and fixed some Windows compile issues. (Thanks to alex85k.)
  • Use array instead of map to store input/output format creators.
  • Update included catch.hpp to version 1.12.1.

Fixed

  • Remove check for lost ways in multipolygon assembler. This rules out too many valid multipolygons, more specifically more complex ones with touching inner rings.
  • Use different macro magic for registering index maps. This allows the maps to be used for several types at the same time.
  • Lots of code was rewritten to fix warnings reported by clang-tidy making libosmium more robust.
  • Make ADL work for begin()/end() of InputIterator<Reader>.
  • Various fixes to make the code more robust, including an undefined behaviour in the debug output format and a buffer overflow in the o5m parser.
  • Range checks in o5m parser throw exceptions now instead of triggering assertions.
  • Better checking that PBF data is in range.
  • Check read and write system calls for EINTR.
  • Use tag and type from protozero to make PBF parser more robust.
  • Test testdata-multipolygon on Windows was using the wrong executable name.

2.13.1 - 2017-08-25

Added

  • New "blackhole" file format which throws away all data written into it. Used for benchmarking.

Changed

  • When reading OPL files, CRLF file endings are now handled correctly.
  • Reduce the max number of threads allowed for the Pool to 32. This should still be plenty and might help with test failures on some architectures.

Fixed

  • Tests now run correctly independent of git core.autocrlf setting.
  • Set binary mode for all files on Windows in example code.
  • Low-level file functions now set an invalid parameter handler on Windows to properly handle errors.
  • Restore earlier behaviour allowing zero-length mmap. It is important to allow zero-length memory mapping, because it is possible that such an index is empty, for instance when one type of object is missing from an input file as in https://github.com/osmcode/osmium-tool/issues/65. Drawback is that files must be opened read-write for this to work, even if we only want to read from them.
  • Use Approx() to compare floating point values in tests.
  • Fix broken Item test on 32 bit platforms.

2.13.0 - 2017-08-15

Added

  • New RelationsManager class superseeds the relations::Collector class. The new class is much more modular and easier to extend. If you are using the Collector class, you are encouraged to switch.
  • New MultipolygonManager based on the RelationsManager class superseeds the MultipolygonCollector class. The examples have been changed to use the new class and all users are encouraged to switch. There is also a MultipolygonManagerLegacy class if you still need old-style multipolygon support (see below).
  • New FlexMem index class that works with input files of any size and stores the index in memory. This should now be used as the default index for node location stores. Several example programs now use this index.
  • New CallbackBuffer class, basically a convenient wrapper around the Buffer class with an additional callback function that is called whenever the buffer is full.
  • Introduce new ItemStash class for storing OSM objects in memory.
  • New osmium::geom::overlaps() function to check if two Box objects overlap.
  • Add function IdSet::used_memory() to get estimate of memory used in the set.
  • New is_defined() and is_undefined() methods on Location class.
  • Tests for all provided example programs. (Some tests currently fail on Windows for the osmium_index_lookup program.)

Changed

  • The area Assembler now doesn't work with old-style multipolygons (those are multipolygon relations with the tags on the outer ways(s) instead of on the relation) any more. Because old-style multipolygons are now (mostly) gone from the OSM database this is usually what you want. The new AssemblerLegacy class can be used if you actually need support for old-style multipolygons, for instance if you are working with historical data. (In that case you also need to use the MultipolygonManagerLegacy class instead of the MultipolygonManager class.)
  • Changes for consistent ordering of OSM data: OSM data can come in any order, but usual OSM files are ordered by type, ID, and version. These changes extend this ordering to negative IDs which are sometimes used for objects that have not been uploaded to the OSM server yet. 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.
  • Multipolygon assembler now checks for three or more overlapping segments which are always an error and can report them.
  • Enable use of user-provided thread::Pool instances in Reader and Writer for special use cases.
  • Growing a Buffer will now work with any capacity parameter, it is always rounded up for proper alignment. Buffer constructor with three arguments will now check that commmitted is not larger than capacity.
  • Updated embedded protozero to 1.5.2.
  • Update version of Catch unit test framework to 1.9.7.
  • And, as always, lots of small code cleanups and more tests.

Fixed

  • Buffers larger than 2^32 bytes do now work.
  • Output coordinate with value of -2^31 correctly.
  • Changeset comments with more than 2^16 characters are now allowed. The new maximum size is 2^32.
  • ChangesetDiscussionBuilder::add_comment_text() could fail silently instead of throwing an exception.
  • Changeset bounding boxes are now always output to OSM files (any format) if at least one of the corners is defined. This is needed to handle broken data from the main OSM database which contains such cases. The OPL reader has also been fixed to handle this case.
  • In the example osmium_location_cache_create, the index file written is always truncated first.

2.12.2 - 2017-05-03

Added

  • Add two argument (key, value) overload of TagMatcher::operator().

Changed

  • Detect, report, and remove duplicate ways in multipolygon relations.
  • Change EOF behaviour of Reader: The Reader::read() function will now always return an invalid buffer exactly once to signal EOF.
  • Update QGIS multipolygon project that is part of the test suite to show more problem types.
  • Copy multipolygon QGIS file for tests to build dir in cmake step.
  • Some code cleanups and improved debug output in multipolygon code.
  • Refactor I/O code to simplify code.
  • Disable some warnings on MSVC.
  • Various small code and build script changes.

Fixed

  • Two bugs in area assembler affecting very complex multipolygons and multipolygons with overlapping or nearly overlapping lines.
  • Invalid use of iterators leading to undefined behaviour in area assembler code.
  • Area assembler stats were not correctly counting inner rings that are areas in their own right.
  • Fix a thread problem valgrind found that might or might not be real.
  • Read OPL file correctly even if trailing newline in file is missing.
  • Include order for osmium/index/map headers and osmium/index/node_locations_map.hpp (or osmium/handler/node_locations_for_ways.hpp) doesn't matter any more.

2.12.1 - 2017-04-10

Added

  • New TagsFilter::set_default_result() function.

Changed

  • Use larger capacity for Buffer if necessary for alignment instead of throwing an exception. Minimum buffer size is now 64 bytes.
  • Check order of input data in relations collector. The relations collector can not deal with history data or a changes file. This was documented as a requirement, but often lead to problems, because this was ignored by users. So it now checks that the input data it gets is ordered and throws an exception otherwise.
  • When writing an OSM file, set generator to libosmium if not set by app.

Fixed

  • Infinite loop in Buffer::reserve_space(). (Issue #202.)
  • ObjectPointerCollection::unique() now removes elements at end.
  • Tests comparing double using == operator.
  • Build on Cygwin.

2.12.0 - 2017-03-07

Added

  • TagMatcher and TagsFilter classes for more flexibly matching tags and selecting objects based on tags. This obsoletes the less flexible classes based on osmium::tags::Filter classes.
  • Extended index::RelationsMap(Stash|Index) classes to also allow parent-to-member lookups.
  • New nrw_array helper class.
  • ObjectPointerCollection::unique() function.

Changed

  • Area assembler can now detect invalid locations and report them in the stats and through the problem reporter. If the new config option ignore_invalid_locations is set, the Assembler will pretend they weren't even referenced in the ways. (Issue #195.)
  • osmium::area::Assembler::operator() will now return a boolean reporting whether building of the area(s) was successful.
  • Split up area Assembler class into three classes: The detail::BasicAssembler is now the parent class. Assembler is the child class for usual use. The new GeomAssembler also derives from BasicAssembler and builds areas without taking tags into account at all. This is to support osm2pgsql which does tag handling itself. (Issue #194.)
  • The Projection class can do any projection supported by the Proj.4 library. As a special case it now uses our own Mercator projection functions when the web mercator projection (EPSG 3857) is used. This is much faster than going through Proj.4.
  • Better error messages for low-level file utility functions.
  • Mark build_tag_list* functions in builder_helper.hpp as deprecated. You should use the functions from osmium/builder/attr.hpp instead.
  • Improved performance of the osmium::tags::match_(any|all|none)_of functions.
  • Improved performance of string comparison in tags::Filter.
  • Update version of Catch unit test framework to 1.8.1. This meant some tests had to be updated.
  • Use get_noexcept() in NodeLocationsForWays handler.
  • And lots of code and test cleanups...

Fixed

  • Terminate called on full non-auto-growing buffer. (Issue #189.)
  • When file formats were used that were not compiled into the binary, it terminated instead of throwing. (Issue #197.)
  • Windows build problem related to including two different winsock versions.
  • Windows build problem related to forced build for old Windows versions. (Issue #196.)
  • Clear stream contents in ProblemReporterException correctly.
  • Add -pthread compiler and linker options on Linux/OSX. This should fix a problem where some linker versions will not link binaries correctly when the --as-needed option is used.
  • The Filter::count() method didn't compile at all.
  • XML reader doesn't fail on relation member ref=0 any more.

2.11.0 - 2017-01-14

Added

  • New index::RelationsMap(Stash|Index) classes implementing an index for looking up parent relation IDs given a member relation ID.
  • Add get_noexcept() method to all index maps. For cases where ids are often not in the index using this can speed up a program considerably.
  • New non-const WayNodeList::operator[].
  • Default constructed "invalid" Coordinates.
  • Tile constructor from web mercator coordinates and some helper functions for tile arithmetic.
  • Tag matcher matching keys using a regex.
  • New envelope() functions on NodeRefList, Way, and Area returning a Box object with the geometric envelope of the object.
  • Add amenity_list example.

Changed

  • Replaced the implementation for the web mercator projection using the usual tan-formula with a polynomial approximation which is much faster and good enough for OSM data which only has ~1cm resolution anyway. See https://github.com/osmcode/mercator-projection for all the details and benchmarks. You can disable this by defining the macro OSMIUM_USE_SLOW_MERCATOR_PROJECTION before including any of the Osmium headers.
  • Removed the outdated Makefile. Always use CMake directly to build.
  • Refactoring of osmium::apply() removing the resursive templates for faster compile times and allowing rvalue handlers.
  • Lots of code and test cleanups and more documentation.

Fixed

  • Handle endianess on FreeBSD properly.
  • Fixed doxygen config for reproducible builds.

2.10.3 - 2016-11-20

Changed

  • Round out ObjectPointerCollection implementation and test it.
  • Updated embedded protozero to 1.4.5.

2.10.2 - 2016-11-16

Changed

  • Updated embedded protozero to 1.4.4.

Fixed

  • Buffer overflow in osmium::Buffer.

2.10.1 - 2016-11-15

Changed

  • Updated embedded protozero to 1.4.3.

Fixed

  • Made IdSet work on 32bit systems.
  • Fixed endianness check for WKB tests.

2.10.0 - 2016-11-11

Added

  • The Reader can take an additional optional read_meta flag. If this is set to false the PBF input will ignore metadata on OSM objects (like version, timestamp, uid, ...) which speeds up file reading by 10 to 20%.
  • New IdSet virtual class with two implementations: IdSetDense and IdSetSmall. Used to efficiently store a set of Ids. This is often needed to track, for instance, which nodes are needed for ways, etc.
  • Added more examples and better documented existing examples.
  • Add a benchmark "mercator" converting all node locations in a file to WebMercator and creating geometries in WKB format.

Changed

  • Better queue handling makes I/O faster in some circumstances.
  • The FindOsmium.cmake CMake script can now check a current enough libosmium version is found.
  • Builders can now be constructed with a reference to parent builder.
  • Made builders more robust by adding asserts that will catch common usage problems.
  • Calling OSMObjectBuilder::add_user() is now optional, and the method was renamed to set_user(). (add_user() is marked as deprecated.)
  • Benchmarks now show compiler and compiler options used.
  • Builder::add_item() now takes a reference instead of pointer (old version of the function marked as deprecated).
  • GEOS support is deprecated. It does not work any more for GEOS 3.6 or newer. Reason is the changed interface in GEOS 3.6. If there is interest for the GEOS support, we can add support back in later (but probably using the GEOS C API which is more stable than the C++ API). Some tests using GEOS were rewritten to work without it.
  • The BoolVector has been deprecated in favour of the new IdSet classes.
  • Lots of code cleanups and improved API documentation in many places.
  • The relations collector can now tell you whether a relation member was in the input data. See the new is_available() and get_availability_and_offset() methods.
  • Updated embedded Catch unit test header to version 1.5.8.

Fixed

  • Parsing of coordinates starting with decimal dot and coordinates in scientific notation.
  • ~ operator for entity_bits doesn't set unused bits any more.
  • Progress bar can now be (temporarily) removed, to allow other output.

2.9.0 - 2016-09-15

Added

  • Support for reading OPL files.
  • For diff output OSM objects in buffers can be marked as only in one or the other file. The OPL and debug output formats support diff output based on this.
  • Add documentation and range checks to Tile struct.
  • More documentation.
  • More examples and more extensive comments on examples.
  • Support for a progress report in osmium::io::Reader() and a ProgressBar utility class to use it.
  • New OSMObject::set_timestamp(const char*) function.

Changed

  • Parse coordinates in scientific notations ourselves.
  • Updated included protozero version to 1.4.2.
  • Lots of one-argument constructors are now explicit.
  • Timestamp parser now uses our own implementation instead of strptime. This is faster and independant of locale settings.
  • More cases of invalid areas with duplicate segments are reported as errors.

Fixed

  • Fixed a problem limiting cache file sizes on Windows to 32 bit.
  • Fixed includes.
  • Exception messages for invalid areas do not report "area contains no rings" any more, but "invalid area".

2.8.0 - 2016-08-04

Added

  • EWKT support.
  • Track pop type calls and queue underruns when OSMIUM_DEBUG_QUEUE_SIZE environment variable is set.

Changed

  • Switched to newest protozero v1.4.0. This should deliver some speedups when parsing PBF files. This also removes the DeltaEncodeIterator class, which isn't needed any more.
  • Uses std::unordered_map instead of std::map in PBF string table code speeding up writing of PBF files considerably.
  • Uses less memory when writing PBF files (smaller string table by default).
  • Removes dependency on sparsehash and boost program options libraries for examples.
  • Cleaned up threaded queue code.

Fixed

  • A potentially very bad bug was fixed: When there are many and/or long strings in tag keys and values and/or user names and/or relation roles, the string table inside a PBF block would overflow. I have never seen this happen for normal OSM data, but that doesn't mean it can't happen. The result is that the strings will all be mixed up, keys for values, values for user names or whatever.
  • Automatically set correct SRID when creating WKB and GEOS geometries. Note that this changes the behaviour of libosmium when creating GEOS geometries. Before we created them with -1 as SRID unless set otherwise. Manual setting of the SRID on the GEOSGeometryFactory is now deprecated.
  • Allow coordinates of nodes in scientific notation when reading XML files. This shouldn't be used really, but sometimes you can find them.

2.7.2 - 2016-06-08

Changed

  • Much faster output of OSM files in XML, OPL, or debug formats.

Fixed

  • Parsing and output of coordinates now faster and always uses decimal dot independant of locale setting.
  • Do not output empty discussion elements in changeset XML output.
  • Data corruption regression in mmap based indexes.

2.7.1 - 2016-06-01

Fixes

  • Update version number in version.hpp.

2.7.0 - 2016-06-01

Added

  • New functions for iterating over specific item types in buffers (osmium::memory::Buffer::select()), over specific subitems (osmium::OSMObject::subitems()), and for iterating over all rings of an area (osmium::Areas::outer_rings(), inner_rings()).
  • Debug output optionally prints CRC32 when add_crc32 file option is set.

Changed

  • XML parser will not allow any XML entities which are usually not used in OSM files anyway. This can help avoiding DOS attacks.
  • Removed SortedQueue implementation which was never used.
  • Also incorporate Locations in NodeRefs into CRC32 checksums. This means all checksums will be different compared to earlier versions of libosmium.
  • The completely new algorithm for assembling multipolygons is much faster, has better error reporting, generates statistics and can build more complex multipolygons correctly. The ProblemReporter classes have changed to make this happen, if you have written your own, you have to fix it.
  • Sparse node location stores are now only sorted if needed, ie. when nodes come in unordered.

Fixed

  • Output operator for Location shows full precision.
  • Undefined behaviour in WKB writer and types_from_string() function.
  • Fix unsigned overflow in pool.hpp.
  • OSM objects are now ordered by type (nodes, then ways, then relations), then ID, then version, then timestamp. Ordering by timestamp is normally not necessary, because there can't be two objects with same type, ID, and version but different timestamp. But this can happen when diffs are created from OSM extracts, so we check for this here. This change also makes sure IDs are always ordered by absolute IDs, positives first, so order is 0, 1, -1, 2, -2, ...
  • Data corruption bug fixed in disk based indexes (used for the node location store for instance). This only affected you, if you created and index, closed it, and re-opened it (possibly in a different process) and if there were missing nodes. If you looked up those nodes, you got location (0,0) back instead of an error.
  • Memory corruption bug showing up with GDAL 2.

2.6.1 - 2016-02-22

Added

  • Add WITH_PROFILING option to CMake config. When enabled, this sets the -fno-omit-frame-pointer compiler option.

Changed

  • Massive speed improvements when building multipolygons.
  • Uses (and includes) new version 1.3.0 of protozero library.
  • Removed dependency on Boost Iterator for PBF writer.
  • Example program osmium_area_test now uses cerr instead of cout for debug output.

2.6.0 - 2016-02-04

Added

  • The new handler osmium::handler::CheckOrder can be used to check that a file is properly ordered.
  • Add new method to build OSM nodes, ways, relations, changesets, and areas in buffers that wraps the older Builder classes. The new code is much easier to use and very flexible. There is no documentation yet, but the tests in test/t/builder/test_attr.cpp can give you an idea how it works.
  • Add util class to get memory usage of current process on Linux.

Changed

  • New Buffer memory management speeds up Buffer use, because it doesn't clear the memory unnecessarily.

Fixed

  • osmium::Box::extend() function now ignores invalid locations.
  • Install of external library headers.
  • Check way has at least one node before calling is_closed() in area assembler.
  • Declaration/definition of some friend functions was in the wrong namespace.

2.5.4 - 2015-12-03

Changed

  • Included gdalcpp.hpp header was updated to version 1.1.1.
  • Included protozero library was updated to version 1.2.3.
  • Workarounds for missing constexpr support in Visual Studio removed. All constexpr features we need are supported now.
  • Some code cleanup after running clang-tidy on the code.
  • Re-added Buffer::value_type typedef. Turns out it is needed when using std::back_inserter on the Buffer.

Fixed

  • Bugs with Timestamp code on 32 bit platforms. This necessitated some changes in Timestamp which might lead to changes in user code.
  • Bug in segment intersection code (which appeared on i686 platform).

2.5.3 - 2015-11-17

Added

  • osmium::make_diff_iterator() helper function.

Changed

  • Deprecated osmium::Buffer::set_full_callback().
  • Removed DataFile class which was never used anywhere.
  • Removed unused and obscure Buffer::value_type typedef.

Fixed

  • Possible overrun in Buffer when using the full-callback.
  • Incorrect swapping of Buffer.

2.5.2 - 2015-11-06

Fixed

  • Writing data through an OutputIterator was extremly slow due to lock contention.

2.5.1 - 2015-11-05

Added

  • Header osmium/fwd.hpp with forward declarations of the most commonly used Osmium classes.

Changed

  • Moved osmium/io/overwrite.hpp to osmium/io/writer_options.hpp If you still include the old file, you'll get a warning.

2.5.0 - 2015-11-04

Added

  • Helper functions to make input iterator ranges and output iterators.
  • Add support for reading o5m and o5c files.
  • Option for osmium::io::Writer to fsync file after writing.
  • Lots of internal asserts() and other robustness checks.

Changed

  • Updated included protozero library to version 1.2.0.
  • Complete overhaul of the I/O system making it much more robust against wrong data and failures during I/O operations.
  • Speed up PBF writing by running parts of it in parallel.
  • OutputIterator doesn't hold an internal buffer any more, but it uses one in Writer. Calling flush() on the OutputIterator isn't needed any more.
  • Reader now throws when trying to read after eof or an error.
  • I/O functions that used to throw std::runtime_error now throw osmium::io_error or derived.
  • Optional parameters on osmium::io::Writer now work in any order.

Fixed

  • PBF reader now decodes locations of invisible nodes properly.
  • Invalid Delta encode iterator dereference.
  • Lots of includes fixed to include (only) what's used.
  • Dangling reference in area assembly code.

2.4.1 - 2015-08-29

Fixed

  • CRC calculation of tags and changesets.

2.4.0 - 2015-08-29

Added

  • Checks that user names, member roles and tag keys and values are not longer than 256 * 4 bytes. That is the maximum length 256 Unicode characters can have in UTF-8 encoding.
  • Support for GDAL 2. GDAL 1 still works.

Changed

  • Improved CMake build scripts.
  • Updated internal version of Protozero to 1.1.0.
  • Removed toogr* examples. They are in their own repository now. See https://github.com/osmcode/osm-gis-export.
  • Files about to be memory-mapped (for instance index files) are now set to binary mode on Windows so the application doesn't have to do this.

Fixed

  • Hanging program when trying to open file with an unknown file format.
  • Building problems with old boost versions.
  • Initialization errors in PBF writer.
  • Bug in byte swap code.
  • Output on Windows now always uses binary mode, even when writing to stdout, so OSM xml and opl files always use LF line endings.

2.3.0 - 2015-08-18

Added

  • Allow instantiating osmium::geom::GEOSFactory with existing GEOS factory.
  • Low-level functions to support generating a architecture- and endian- independant CRC from OSM data. This is intended to be uses with boost::crc.
  • Add new debug output format. This format is not intended to be read automatically, but for human consumption. It formats the data nicely.
  • Make writing of metadata configurable for XML and OPL output (use add_metadata=false as file option).

Changed

  • Changed add_user() and add_role() in builders to use string length without the 0-termination.
  • Improved code setting file format from suffix/format argument.
  • Memory mapping utility class now supports readonly, private writable or shared writable operation.
  • Allow empty version (0) in PBF files.
  • Use utf8cpp header-only lib instead of boost for utf8 decoding. The library is included in the libosmium distribution.
  • New PBF reader and writer based on the protozero. A complete rewrite of the code for reading and writing OSM PBF files. It doesn't use the Google protobuf library and it doesn't use the OSMPBF/OSM-Binary library any more. Instead is uses the protozero lightweight protobuf header library which is included in the code. Not only does the new code have less dependencies, it is faster and more robust. https://github.com/mapbox/protozero

Fixed

  • Various smaller bug fixes.
  • Add encoding for relation member roles in OPL format.
  • Change character encoding to new format in OPL: variable length hex code between % characters instead of a % followed by 4-digit hex code. This is necessary because unicode characters can be longer than the 4-digit hex code.
  • XML writer: The linefeed, carriage return, and tab characters are now escaped properly.
  • Reading large XML files could block.

2.2.0 - 2015-07-04

Added

  • Conversion functions for some low-level types.
  • BoolVector index class.
  • min_op/max_op utility functions.
  • More tests here and there.
  • Helper methods is_between() and is_visible_at() to DiffObject.
  • GeoJSON factory using the RapidJSON library.
  • Support for tile calculations.
  • Create simple polygons from ways in geom factories.
  • MemoryMapping and TypedMemoryMapping helper classes.
  • close() function to mmap_vector_base class.
  • Function on Buffer class to get iterator to specific offset.
  • Explicit cast operator from osmium::Timestamp to uint32_t.

Changed

  • Throw exception on illegal values in functions parsing strings to get ids, versions, etc.
  • Improved error message for geometry exceptions.

Fixed

  • Throw exception from dump_as_array() and dump_as_list() functions if not implemented in an index.
  • After writing OSM files, program could stall up to a second.
  • Dense location store was written out only partially.
  • Use uint64_t as counter in benchmarks, so there can be no overflows.
  • Example programs now read packed XML files, too.
  • Refactoring of memory mapping code. Removes leak on Windows.
  • Better check for invalid locations.
  • Mark cbegin() and cend() of mmap_vector_base as const functions.

2.1.0 - 2015-03-31

Added

  • When writing PBF files, sorting the PBF stringtables is now optional.
  • More tests and documentation.

Changed

  • Some functions are now declared noexcept.
  • XML parser fails now if the top-level element is not osm or osmChange.

Fixed

  • Race condition in PBF reader.
  • Multipolygon collector was accessing non-existent NodeRef.
  • Doxygen documentation wan't showing all classes/functions due to a bug in Doxygen (up to version 1.8.8). This version contains a workaround to fix this.