Class FacetSequence

java.lang.Object
org.locationtech.jts.operation.distance.FacetSequence

public class FacetSequence extends Object
Represents a sequence of facets (points or line segments) of a Geometry specified by a subsequence of a CoordinateSequence.
  • Field Details

  • Constructor Details

    • 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 section
      start - the index of the start point
      end - 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 sequence
      start - the index of the point
  • Method Details

    • 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 String toString()
      Overrides:
      toString in class Object