Class FacetSequence
- java.lang.Object
-
- org.locationtech.jts.operation.distance.FacetSequence
-
public class FacetSequence extends java.lang.Object
Represents a sequence of facets (points or line segments) of aGeometry
specified by a subsequence of aCoordinateSequence
.
-
-
Field Summary
Fields Modifier and Type Field Description private int
end
private Coordinate
p0
private Coordinate
p1
private Coordinate
pt
private CoordinateSequence
pts
private Coordinate
q0
private Coordinate
q1
private Coordinate
seqPt
private int
start
-
Constructor Summary
Constructors Constructor Description FacetSequence(CoordinateSequence pts, int start)
Creates a new sequence for a single point from a CoordinateSequence.FacetSequence(CoordinateSequence pts, int start, int end)
Creates a new section based on a CoordinateSequence.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private double
computeLineLineDistance(FacetSequence facetSeq)
private double
computePointLineDistance(Coordinate pt, FacetSequence facetSeq)
double
distance(FacetSequence facetSeq)
Coordinate
getCoordinate(int index)
Envelope
getEnvelope()
boolean
isPoint()
int
size()
java.lang.String
toString()
-
-
-
Field Detail
-
pts
private CoordinateSequence pts
-
start
private int start
-
end
private int end
-
pt
private Coordinate pt
-
seqPt
private Coordinate seqPt
-
p0
private Coordinate p0
-
p1
private Coordinate p1
-
q0
private Coordinate q0
-
q1
private Coordinate q1
-
-
Constructor Detail
-
FacetSequence
public FacetSequence(CoordinateSequence pts, int start, int end)
Creates a new section based on a CoordinateSequence.- Parameters:
pts
- the sequence holding the points in the sectionstart
- the index of the start pointend
- the index of the end point + 1
-
FacetSequence
public FacetSequence(CoordinateSequence pts, int start)
Creates a new sequence for a single point from a CoordinateSequence.- Parameters:
pts
- the sequence holding the points in the facet sequencestart
- the index of the point
-
-
Method Detail
-
getEnvelope
public Envelope getEnvelope()
-
size
public int size()
-
getCoordinate
public Coordinate getCoordinate(int index)
-
isPoint
public boolean isPoint()
-
distance
public double distance(FacetSequence facetSeq)
-
computeLineLineDistance
private double computeLineLineDistance(FacetSequence facetSeq)
-
computePointLineDistance
private double computePointLineDistance(Coordinate pt, FacetSequence facetSeq)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-