Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
touches (with strategy)

Checks if two geometries have at least one touching point (tangent - non overlapping)

Synopsis

template<typename Geometry1, typename Geometry2, typename Strategy>
bool touches(Geometry1 const & geometry1, Geometry2 const & geometry2, Strategy const & strategy)

Parameters

Type

Concept

Name

Description

Geometry1 const &

Any type fulfilling a Geometry Concept

geometry1

A model of the specified concept

Geometry2 const &

Any type fulfilling a Geometry Concept

geometry2

A model of the specified concept

Strategy const &

Any type fulfilling a Touches Strategy Concept

strategy

The strategy which will be used for touches calculations

Returns

Returns true if two geometries touch each other

Header

Either

#include <boost/geometry.hpp>

Or

#include <boost/geometry/algorithms/touches.hpp>

Conformance

The function touches implements function Touches from the OGC Simple Feature Specification.

The version with one parameter is additional and not described in the OGC standard

[Note] Note

Implemented for Point/Linestring/MultiLinestring/Polygon/MultiPolygon.


PrevUpHomeNext