com.vividsolutions.jts.algorithm

Class SimplePointInAreaLocator


public class SimplePointInAreaLocator
extends java.lang.Object

Computes whether a point lies in the interior of an area Geometry. The algorithm used is only guaranteed to return correct results for points which are not on the boundary of the Geometry.
Version:
1.7

Method Summary

static boolean
containsPointInPolygon(Coordinate p, Polygon poly)
static int
locate(Coordinate p, Geometry geom)
locate is the main location function.

Method Details

containsPointInPolygon

public static boolean containsPointInPolygon(Coordinate p,
                                             Polygon poly)

locate

public static int locate(Coordinate p,
                         Geometry geom)
locate is the main location function. It handles both single-element and multi-element Geometries. The algorithm for multi-element Geometries is more complex, since it has to take into account the boundaryDetermination rule