Class FacetSequence

Hierarchy: Object , FacetSequence
public class FacetSequence
Represents a sequence of facets (points or line segments) of a Geometry specified by a subsequence of a CoordinateSequence.
Authors:
Martin Davis
public FacetSequence(Geometry geom, CoordinateSequence pts, int start, int end)
Creates a new sequence of facets based on a CoordinateSequence contained in the given Geometry.
Parameters:
geom - geom the geometry containing the facets
pts - pts the sequence containing the facet points
start - start the index of the start point
end - end the index of the end point + 1
public FacetSequence(CoordinateSequence pts, int start, int end)
Creates a new sequence of facets based on a CoordinateSequence.
Parameters:
pts - pts the sequence containing the facet points
start - start the index of the start point
end - end the index of the end point + 1
public FacetSequence(CoordinateSequence pts, int start)
Creates a new sequence for a single point from a CoordinateSequence.
Parameters:
pts - pts the sequence containing the facet point
start - start the index of the point
public Envelope getEnvelope()
public int size()
public Coordinate getCoordinate(int index)
public boolean isPoint()
public double distance(FacetSequence facetSeq)
Computes the distance between this and another FacetSequence.
Parameters:
facetSeq - facetSeq the sequence to compute the distance to
Returns:
the minimum distance between the sequences
public GeometryLocation[] nearestLocations(FacetSequence facetSeq)
Computes the locations of the nearest points between this sequence and another sequence. The locations are presented in the same order as the input sequences.
Returns:
a pair of GeometryLocations for the nearest points
public String toString()