com.vividsolutions.jts.operation.distance
Class GeometryLocation
java.lang.Object
com.vividsolutions.jts.operation.distance.GeometryLocation
public class GeometryLocation
extends java.lang.Object
Represents the location of a point on a Geometry.
Maintains both the actual point location (which of course
may not be exact) as well as information about the component
and segment index where the point occurs.
Locations inside area Geometrys will not have an associated segment index,
so in this case the segment index will have the sentinel value of INSIDE_AREA.
static int | INSIDE_AREA - Special value of segment-index for locations inside area geometries.
|
GeometryLocation(Geometry component, Coordinate pt) - Constructs a GeometryLocation specifying a point inside an area geometry.
|
GeometryLocation(Geometry component, int segIndex, Coordinate pt) - Constructs a GeometryLocation specifying a point on a geometry, as well as the
segment that the point is on (or INSIDE_AREA if the point is not on a segment).
|
INSIDE_AREA
public static final int INSIDE_AREA
Special value of segment-index for locations inside area geometries. These
locations do not have an associated segment index.
GeometryLocation
public GeometryLocation(Geometry component,
Coordinate pt)
Constructs a GeometryLocation specifying a point inside an area geometry.
GeometryLocation
public GeometryLocation(Geometry component,
int segIndex,
Coordinate pt)
Constructs a GeometryLocation specifying a point on a geometry, as well as the
segment that the point is on (or INSIDE_AREA if the point is not on a segment).
getCoordinate
public Coordinate getCoordinate()
Returns the location.
getGeometryComponent
public Geometry getGeometryComponent()
Returns the geometry associated with this location.
getSegmentIndex
public int getSegmentIndex()
Returns the segment index for this location. If the location is inside an
area, the index will have the value INSIDE_AREA;
- the segment index for the location, or INSIDE_AREA
isInsideArea
public boolean isInsideArea()
Returns whether this GeometryLocation represents a point inside an area geometry.