Class TopologyStretcher

java.lang.Object
org.locationtech.jtstest.testbuilder.topostretch.TopologyStretcher

public class TopologyStretcher extends Object
Stretches the vertices and segments of a @link Geometry} to make the topology more visible.
  • Field Details

    • stretchDistance

      private double stretchDistance
    • inputGeoms

      private Geometry[] inputGeoms
    • linestrings

      private List linestrings
    • modifiedCoords

      private List[] modifiedCoords
  • Constructor Details

    • TopologyStretcher

      public TopologyStretcher(Geometry g)
    • TopologyStretcher

      public TopologyStretcher(Geometry g1, Geometry g2)
  • Method Details

    • numVerticesInMask

      public int numVerticesInMask(Envelope mask)
    • stretch

      public Geometry[] stretch(double nearnessTol, double stretchDistance)
    • stretch

      public Geometry[] stretch(double nearnessTol, double stretchDistance, Envelope mask)
    • getModifiedCoordinates

      public List[] getModifiedCoordinates()
      Gets the Coordinates in each stretched geometry which were modified (if any).
      Returns:
      lists of Coordinates, one for each input geometry
    • extractLineStrings

      private List extractLineStrings(Geometry[] geom, Envelope mask)
    • getCoordinateMoves

      private Map getCoordinateMoves(List nearVerts)