Class GeometryLocation

Hierarchy: Object , GeometryLocation
public class GeometryLocation
Represents the location of a point on a Geometry. Maintains both the actual point location (which may not be exact, if the point is not a vertex) 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.

Other

  • version: 1.7
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).
Parameters:
component - component the component of the geometry containing the point
segIndex - segIndex the segment index of the location, or INSIDE_AREA
pt - pt the coordinate of the location
public GeometryLocation(Geometry component, Coordinate pt)
Constructs a GeometryLocation specifying a point inside an area geometry.
Parameters:
component - component the component of the geometry containing the point
pt - pt the coordinate of the location
public Geometry getGeometryComponent()
Returns the geometry component on (or in) which this location occurs.
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;
Returns:
the segment index for the location, or INSIDE_AREA
public Coordinate getCoordinate()
Returns the Coordinate of this location.
public boolean isInsideArea()
Tests whether this location represents a point inside an area geometry.
public String toString()