GEOS  3.8.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::algorithm::locate::SimplePointInAreaLocator Class Reference

Computes the location of points relative to an areal Geometry, using a simple O(n) algorithm. More...

#include <SimplePointInAreaLocator.h>

Inheritance diagram for geos::algorithm::locate::SimplePointInAreaLocator:
geos::algorithm::locate::PointOnGeometryLocator

Public Member Functions

 SimplePointInAreaLocator (const geom::Geometry *p_g)
 
int locate (const geom::Coordinate *p) override
 

Static Public Member Functions

static int locate (const geom::Coordinate &p, const geom::Geometry *geom)
 
static int locatePointInPolygon (const geom::Coordinate &p, const geom::Polygon *poly)
 

Detailed Description

Computes the location of points relative to an areal Geometry, using a simple O(n) algorithm.

This algorithm is suitable for use in cases where only one or a few points will be tested against a given area.

The algorithm used is only guaranteed to return correct results for points which are not on the boundary of the Geometry.

Version
1.7

Member Function Documentation

int geos::algorithm::locate::SimplePointInAreaLocator::locate ( const geom::Coordinate p)
inlineoverridevirtual

Determines the Location of a point in an areal Geometry.

Parameters
pthe point to test
Returns
the location of the point in the geometry

Implements geos::algorithm::locate::PointOnGeometryLocator.

static int geos::algorithm::locate::SimplePointInAreaLocator::locatePointInPolygon ( const geom::Coordinate p,
const geom::Polygon poly 
)
static

Determines the Location of a point in a Polygon. Computes Location::BOUNDARY if the point lies exactly on the polygon boundary.

Parameters
pthe point to test
polythe geometry to test
Returns
the Location of the point in the polygon

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