GGL    Boost C++ Libraries

equals: detect if two geometries are spatially equal


Functions

template<typename Geometry1 , typename Geometry2 >
bool ggl::equals (Geometry1 const &geometry1, Geometry2 const &geometry2)
 Detect if two geometries are spatially equal.

Detailed Description

Equals returns true if geometries are spatially equal. Spatially equal means including the same point-set. A linestring can be spatially equal to another linestring, even if both do not have the same amount of points. A polygon can be spatially equal to a multi-polygon (which then has only one element).

Geometries:
  • point + point
  • box + box
Note:
There is a functor compare as well, which can be used for std:: library compatibility.

Function Documentation

template<typename Geometry1 , typename Geometry2 >
bool ggl::equals ( Geometry1 const &  geometry1,
Geometry2 const &  geometry2 
)

Detect if two geometries are spatially equal.

Template Parameters:
Geometry1 first geometry type
Geometry2 second geometry type
Parameters:
geometry1 first geometry
geometry2 second geometry
Returns:
true if geometries are spatially equal, else false
Examples:
07_graph_route_example.cpp.

Definition at line 304 of file equals.hpp.


November 5, 2009

Copyright © 1995-2009 Barend Gehrels, Geodan, Amsterdam
Copyright © 2008-2009 Bruno Lalande, Paris
Copyright © 2009 Mateusz Loskot, Cadcorp, London
Documentation is generated by Doxygen