#include <area.hpp>
List of all members.
Public Member Functions |
| AreaFromRelation (Relation *r, bool b, int n, void(*callback)(Osmium::OSM::Area *), bool repair) |
| ~AreaFromRelation () |
osm_object_type_t | get_type () const |
void | add_member_way (Osmium::OSM::Way *way) |
| Add way to list of member ways. This will create a copy of the way.
|
bool | is_complete () |
| Do we have all the ways we need to build the multipolygon?
|
void | handle_complete_multipolygon () |
Private Member Functions |
bool | ignore_tag (const std::string &s) |
bool | same_tags (const Object *a, const Object *b) |
bool | merge_tags (Object *a, const Object *b) |
bool | untagged (const Object *r) |
geos::geom::LinearRing * | create_non_intersecting_linear_ring (geos::geom::CoordinateSequence *orig_cs) |
RingInfo * | make_one_ring (std::vector< WayInfo * > &ways, osm_object_id_t first, osm_object_id_t last, int ringcount, int sequence) |
bool | find_and_repair_holes_in_rings (std::vector< WayInfo * > *ways) |
bool | build_geometry () |
bool | geometry_error (const char *message) |
Private Attributes |
bool | boundary |
| was this area created from relation with tag type=boundary?
|
Relation * | relation |
| the relation this area was build from
|
std::vector< Osmium::OSM::Way > | member_ways |
| the member ways of this area
|
int | num_ways |
| number of ways in this area
|
int | missing_ways |
| how many ways are missing before we can build the multipolygon
|
std::string | geometry_error_message |
void(* | callback )(Osmium::OSM::Area *) |
| callback we should call when a multipolygon was completed
|
bool | attempt_repair |
| whether we want to repair a broken geometry
|
Constructor & Destructor Documentation
Member Function Documentation
Add way to list of member ways. This will create a copy of the way.
Tries to build a multipolygon from the given relation.
This helper gets called when we find a ring that is not valid - usually because it self-intersects. The method tries to salvage as much of the ring as possible, using binary search to find the bit that needs to be cut out. It then returns a valid LinearRing, or NULL if none can be built.
There is massive potential for improvement here. The biggest limitation is that this method does not deliver results for linear rings with more than one self-intersection.
Checks if there are any dangling ends, and connects them to the nearest other dangling end with a straight line. This could conceivably introduce intersections, but it's the best we can do.
Returns true on success.
(This implementation always succeeds because it is impossible for there to be only one dangling end in a collection of lines.)
Do we have all the ways we need to build the multipolygon?
Tries to collect 1...n ways from the n ways in the given list so that they form a closed ring. If this is possible, flag those as being used by ring #ringcount in the way list and return the geometry. (The method may be called again to find further rings.) If this is not possible, return NULL.
returns false if there was a collision, true otherwise
Member Data Documentation
whether we want to repair a broken geometry
was this area created from relation with tag type=boundary?
callback we should call when a multipolygon was completed
the member ways of this area
how many ways are missing before we can build the multipolygon
number of ways in this area
the relation this area was build from
The documentation for this class was generated from the following file: