Boost.Geometry    Boost C++ Libraries
Functions
equals: detect if two geometries are spatially equal

Functions

template<typename Geometry1 , typename Geometry2 , typename Strategy >
bool boost::geometry::equals (Geometry1 const &geometry1, Geometry2 const &geometry2, Strategy const &strategy)
 Checks if a geometry are spatially equal. More...
 
template<typename Geometry1 , typename Geometry2 >
bool boost::geometry::equals (Geometry1 const &geometry1, Geometry2 const &geometry2)
 Checks if a geometry are spatially equal. More...
 

Detailed Description

Function Documentation

template<typename Geometry1 , typename Geometry2 , typename Strategy >
bool boost::geometry::equals ( Geometry1 const &  geometry1,
Geometry2 const &  geometry2,
Strategy const &  strategy 
)

Checks if a geometry are spatially equal.

The free function equals checks if the first geometry is spatially equal the second geometry. Spatially equal means that the same point set is included. A box can therefore be spatially equal to a ring or a polygon, or a linestring can be spatially equal to a multi-linestring or a segment. This only works theoretically, not all combinations are implemented yet.

Template Parameters
Geometry1Any type fulfilling a Geometry Concept
Geometry2Any type fulfilling a Geometry Concept
StrategyAny type fulfilling a Equals Strategy Concept
Parameters
geometry1A model of the specified concept
geometry2A model of the specified concept
strategyThe strategy which will be used for equals calculations
Returns
Returns true if two geometries are spatially equal
Examples:
01_point_example.cpp, 07_a_graph_route_example.cpp, and 07_b_graph_route_example.cpp.
template<typename Geometry1 , typename Geometry2 >
bool boost::geometry::equals ( Geometry1 const &  geometry1,
Geometry2 const &  geometry2 
)

Checks if a geometry are spatially equal.

The free function equals checks if the first geometry is spatially equal the second geometry. Spatially equal means that the same point set is included. A box can therefore be spatially equal to a ring or a polygon, or a linestring can be spatially equal to a multi-linestring or a segment. This only works theoretically, not all combinations are implemented yet.

Template Parameters
Geometry1Any type fulfilling a Geometry Concept
Geometry2Any type fulfilling a Geometry Concept
Parameters
geometry1A model of the specified concept
geometry2A model of the specified concept
Returns
Returns true if two geometries are spatially equal

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen