Class FacetSequence
java.lang.Object
org.locationtech.jts.operation.distance.FacetSequence
Represents a sequence of facets (points or line segments)
of a
Geometry
specified by a subsequence of a CoordinateSequence.- Author:
- Martin Davis
-
Constructor Summary
ConstructorsConstructorDescriptionFacetSequence(CoordinateSequence pts, int start) Creates a new sequence for a single point from aCoordinateSequence.FacetSequence(CoordinateSequence pts, int start, int end) Creates a new sequence of facets based on aCoordinateSequence.FacetSequence(Geometry geom, CoordinateSequence pts, int start, int end) Creates a new sequence of facets based on aCoordinateSequencecontained in the givenGeometry. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance(FacetSequence facetSeq) Computes the distance between this and another FacetSequence.getCoordinate(int index) booleanisPoint()nearestLocations(FacetSequence facetSeq) Computes the locations of the nearest points between this sequence and another sequence.intsize()toString()
-
Constructor Details
-
FacetSequence
Creates a new sequence of facets based on aCoordinateSequencecontained in the givenGeometry.- Parameters:
geom- the geometry containing the facetspts- the sequence containing the facet pointsstart- the index of the start pointend- the index of the end point + 1
-
FacetSequence
Creates a new sequence of facets based on aCoordinateSequence.- Parameters:
pts- the sequence containing the facet pointsstart- the index of the start pointend- the index of the end point + 1
-
FacetSequence
Creates a new sequence for a single point from aCoordinateSequence.- Parameters:
pts- the sequence containing the facet pointstart- the index of the point
-
-
Method Details
-
getEnvelope
-
size
public int size() -
getCoordinate
-
isPoint
public boolean isPoint() -
distance
Computes the distance between this and another FacetSequence.- Parameters:
facetSeq- the sequence to compute the distance to- Returns:
- the minimum distance between the sequences
-
nearestLocations
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
-
toString
-