Class StretchedVertexFinder


  • class StretchedVertexFinder
    extends java.lang.Object
    • Field Detail

      • linestrings

        private java.util.Collection linestrings
      • tolerance

        private double tolerance
      • nearVerts

        private java.util.List nearVerts
    • Constructor Detail

      • StretchedVertexFinder

        public StretchedVertexFinder​(java.util.Collection linestrings,
                                     double tolerance)
      • StretchedVertexFinder

        public StretchedVertexFinder​(java.util.Collection linestrings,
                                     double tolerance,
                                     Envelope limitEnv)
    • Method Detail

      • findNear

        public static java.util.List findNear​(java.util.Collection linestrings,
                                              double tolerance,
                                              Envelope mask)
      • getNearVertices

        public java.util.List getNearVertices()
      • findNearVertices

        private void findNearVertices()
      • geomPointsLen

        private static int geomPointsLen​(Coordinate[] pts)
      • findNearVertices

        private void findNearVertices​(LineString targetLine)
      • findNearVertex

        private void findNearVertex​(Coordinate[] linePts,
                                    int index)
      • findNearVertex

        private void findNearVertex​(Coordinate[] targetPts,
                                    int index,
                                    LineString testLine)
        Finds a single near vertex. This is simply the first one found, not necessarily the nearest. This choice may sub-optimal, resulting in odd result geometry. It's not clear that this can be done better, however. If there are several near points, the stretched geometry is likely to be distorted anyway.
        Parameters:
        targetPts -
        index -
        testLine -