Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 50 million developers.Sign up
- Little optimization for IdSetSmall: Don't add the same id twice in a row.
- 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.
- 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::stringas argument for
builder::attr::_tag. Must contain key and value separated by the equal sign.
builder::attr::_t()function to set tags from comma-separated string.
- 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.
- 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.
- 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.
- Add osmium::Options::empty() for consistency with STL containers.
- Massive reduction of memory consumption in area assembly code. For some very complex polygons memory usage can drop from multiple gigabytes to just megabytes.
- New header option "sorting" when reading and writing PBFs. If the header option "sorting" is set to Type_then_ID
, the optional header propertySort.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.
- 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.
- Instead of handler classes, the
applyfunction can now also take lambdas (or objects from classes implementing
- Add swap, copy constructor and assignment operator to IdSetDense.
- 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
- 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.
- More tests.
- CMake config: also find clang-tidy-7.
- Example and benchmark programs now don't crash with exceptions any more but report them properly.
- Compile with NDEBUG in RelWithDebInfo mode.
- Correctly throw exception in
- Integer truncation on 32 bit systems in
- Exception specification on some functions.
- Forwarding references that might have hidden copy/move constructors.
dump_as_array()to dump sparse array indexes.
- Set the
xml_josm_uploadheader option when reading XML files.
- New function
OSMObject::remove_tags()marks tags on OSM objects as removed.
- More tests.
- When reading OSM files Libosmium now has less memory overhead, especially when reading PBF files. This works by using more, but smaller buffers.
TagsFilterclass is now based on the
TagsFilterBasetemplate 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.
%lldformat instead of using
- Update included gdalcpp to version 1.2.0.
- The gzip/bzip2 compression code was overhauled and is better tested now. This fixes some bugs on Windows.
- 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_BOOSTbefore 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_zlibclass 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.
ntohl. Makes the code simpler and also works on Windows.
MultipolygonCollectorclass as deprecated. Use the
MultipolygonManagerclass introduced in 2.13.0 instead.
- Lots of code cleanups especially around
asserts. Libosmium checks out clean with
clang-tidynow. Some documentation updates.
- Fix compilation error when
fileno()is a macro (as in OpenBSD 6.3).
Boxoutput consistent with the output of a single
Locationand avoids problems with some locales.
ReaderWithProgressBarclass. This wraps an
osmium::ProgressBarinto 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.
- Add git submodule with
osm-testdatarepository. 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.
strftimeby 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
-1is now always accepted for all IDs and returned as
0. This deprecates the
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
osmiumnamespace and some are in
osmium::utilnamespace is now declared
inline. which allows all util classes and functions to be addressed directly in the
osmiumnamespace while keeping backwards compatibility.
- An error is now thrown when the deprecated
pbf_add_metadatafile format option is used. Use
- Extended the
add_metadatafile format option. In addition to allowing the values
no, the new values
noneare now recognized. The option can also be set to a list of attributes
separated by the
+sign. Attributes are
user. All output formats have been updated to only output the specified attributes. This is based on the new
osmium::metadata_optionsclass which stores information about what metadata an
OSMObjecthas or should have. (Thanks to Michael Reichert.)
<(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.
version = -1and
changeset = -1in PBF input. This value is sometimes used by other programs to denote "no value". Osmium uses the
- The example programs using the
getopt_longfunction 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
winsock2library 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.hppto version 1.12.1.
- 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-tidymaking libosmium more robust.
- Make ADL work for
- 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.
writesystem calls for
- Use tag and type from protozero to make PBF parser more robust.
testdata-multipolygonon Windows was using the wrong executable name.