geos::operation::relateng::RelatePointLocator Class Reference

`#include <RelatePointLocator.h>`

## Public Member Functions

| RelatePointLocator (const Geometry *p_geom)
| RelatePointLocator (const Geometry *p_geom, bool p_isPrepared, const BoundaryNodeRule &p_bnRule)
void | init (const Geometry *p_geom)
bool | hasBoundary () const
void | extractElements (const Geometry *geom)
void | addPoint (const Point *pt)
void | addLine (const LineString *line)
void | addPolygonal (const Geometry *polygonal)
Location | locate (const CoordinateXY *p)
int | locateLineEndWithDim (const CoordinateXY *p)
Location | locateNode (const CoordinateXY *p, const Geometry *parentPolygonal)
int | locateNodeWithDim (const CoordinateXY *p, const Geometry *parentPolygonal)
int | locateWithDim (const CoordinateXY *p)

## Detailed Description

Locates a point on a geometry, including mixed-type collections. The dimension of the containing geometry element is also determined. GeometryCollections are handled with union semantics; i.e. the location of a point is that location of that point on the union of the elements of the collection.

Union semantics for GeometryCollections has the following behaviours:

- For a mixed-dimension (heterogeneous) collection a point may lie on two geometry elements with different dimensions. In this case the location on the largest-dimension element is reported.
- For a collection with overlapping or adjacent polygons, points on polygon element boundaries may lie in the effective interior of the collection geometry.

Prepared mode is supported via cached spatial indexes.

Author
  Martin Davis

## Member Function Documentation

## locateNodeWithDim()

int geos::operation::relateng::RelatePointLocator::locateNodeWithDim | ( | const CoordinateXY * | p,
|  | const Geometry * | parentPolygonal )

Locates a point which is known to be a node of the geometry, as a DimensionLocation.

Parameters

  p | the point to locate
  parentPolygonal | the polygon the point is a node of

Returns
  the dimension and location of the point

## locateWithDim()

int geos::operation::relateng::RelatePointLocator::locateWithDim | ( | const CoordinateXY * | p | ) |

Computes the topological location ( Location) of a single point in a Geometry, as well as the dimension of the geometry element the point is located in (if not in the Exterior). It handles both single-element and multi-element Geometries. The algorithm for multi-part Geometries takes into account the SFS Boundary Determination Rule.

Parameters

  p | the point to locate

Returns
  the Location of the point relative to the input Geometry

References locateWithDim().

Referenced by locateWithDim().

The documentation for this class was generated from the following file:

- RelatePointLocator.h