Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <assembler_config.hpp>
Public Member Functions | |
AssemblerConfig () noexcept=default | |
Public Attributes | |
ProblemReporter * | problem_reporter = nullptr |
int | debug_level = 0 |
bool | check_roles = false |
bool | create_empty_areas = true |
bool | create_new_style_polygons = true |
bool | create_old_style_polygons = true |
bool | create_way_polygons = true |
bool | keep_type_tag = false |
bool | ignore_invalid_locations = false |
Configuration for osmium::area::Assembler objects. Create this once, set the options you want and then re-use it every time you create an Assembler object.
|
defaultnoexcept |
bool osmium::area::AssemblerConfig::check_roles = false |
The roles of multipolygon members are ignored when assembling multipolygons, because they are often missing or wrong. If this is set, the roles are checked after the multipolygons are built against what the assembly process decided where the inner and outer rings are. This slows down the processing, so it only makes sense if you want to get the problem reports.
bool osmium::area::AssemblerConfig::create_empty_areas = true |
When the assembler can't create an area, usually because its geometry would be invalid, it will create an "empty" area object without rings. This allows you to detect where an area was invalid.
If this is set to false, invalid areas will simply be discarded.
bool osmium::area::AssemblerConfig::create_new_style_polygons = true |
Create areas for (multi)polygons where the tags are on the relation.
If this is set to false, those areas will simply be discarded.
bool osmium::area::AssemblerConfig::create_old_style_polygons = true |
Create areas for (multi)polygons where the tags are on the outer way(s). This is ignored by the area::Assembler which doesn't support old-style multipolygons any more. Use the area::AssemblerLegacy if you need this.
If this is set to false, those areas will simply be discarded.
bool osmium::area::AssemblerConfig::create_way_polygons = true |
Create areas for polygons created from ways.
If this is set to false, those areas will simply be discarded.
int osmium::area::AssemblerConfig::debug_level = 0 |
Debug level. If this is greater than zero, debug messages will be printed to stderr. Available levels are 1 to 3. Note that level 2 and above will generate a lot of messages!
bool osmium::area::AssemblerConfig::ignore_invalid_locations = false |
If there is an invalid location in any of the ways needed for assembling the multipolygon, the assembler will normally fail. If this is set, the assembler will silently ignore the invalid locations pretending them to be not referenced from the ways. This will allow some areas to be built, others will now be incorrect. This can sometimes be useful to assemble areas crossing the boundary of an extract, but you will also get geometrically valid but wrong (multi)polygons.
bool osmium::area::AssemblerConfig::keep_type_tag = false |
Keep the type tag from multipolygon relations on the area object. By default this is false, and the type tag will be removed.
ProblemReporter* osmium::area::AssemblerConfig::problem_reporter = nullptr |
Optional pointer to problem reporter.