Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.algorithm
Class SimplePointInAreaLocator

    java.lang.Object
      com.vividsolutions.jts.algorithm.SimplePointInAreaLocator

All Implemented Interfaces:
  PointInAreaLocator

public class SimplePointInAreaLocator
extends java.lang.Object
implements PointInAreaLocator

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

Constructor Summary
`SimplePointInAreaLocator(Geometry geom)`

Method Summary
`static boolean` | `containsPointInPolygon(Coordinate p, Polygon poly)`
`int` | `locate(Coordinate p)` Determines the `Location` of a point in an areal `Geometry`.
`static int` | `locate(Coordinate p, Geometry geom)` Determines the `Location` of a point in an areal `Geometry`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimplePointInAreaLocator

    public SimplePointInAreaLocator(Geometry geom)

Method Detail

### locate

    public static int locate(Coordinate p,
                             Geometry geom)

  Determines the `Location` of a point in an areal `Geometry`. Currently this will never return a value of BOUNDARY.

  Parameters:
    `p` - the point to test
    `geom` - the areal geometry to test
  Returns:
    the Location of the point in the geometry

### containsPointInPolygon

    public static boolean containsPointInPolygon(Coordinate p,
                                                 Polygon poly)

### locate

    public int locate(Coordinate p)

  Description copied from interface: `PointInAreaLocator`
  Determines the `Location` of a point in an areal `Geometry`.

  Specified by:
    `locate` in interface `PointInAreaLocator`
  Parameters:
    `p` - the point to test
  Returns:
    the location of the point in the geometry

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD