Class MCIndexPointSnapper.HotPixelSnapAction

java.lang.Object
org.locationtech.jts.index.chain.MonotoneChainSelectAction
org.locationtech.jts.noding.snapround.MCIndexPointSnapper.HotPixelSnapAction
Enclosing class:
MCIndexPointSnapper

public static class MCIndexPointSnapper.HotPixelSnapAction extends MonotoneChainSelectAction
  • Constructor Details

    • HotPixelSnapAction

      public HotPixelSnapAction(HotPixel hotPixel, SegmentString parentEdge, int hotPixelVertexIndex)
  • Method Details

    • isNodeAdded

      public boolean isNodeAdded()
      Reports whether the HotPixel caused a node to be added in any target segmentString (including its own). If so, the HotPixel must be added as a node as well.
      Returns:
      true if a node was added in any target segmentString.
    • select

      public void select(MonotoneChain mc, int startIndex)
      Check if a segment of the monotone chain intersects the hot pixel vertex and introduce a snap node if so. Optimized to avoid noding segments which contain the vertex (which otherwise would cause every vertex to be noded).
      Overrides:
      select in class MonotoneChainSelectAction
      Parameters:
      mc - the parent chain
      startIndex - the index of the start vertex of the segment being processed
    • addSnappedNode

      public boolean addSnappedNode(HotPixel hotPixel, NodedSegmentString segStr, int segIndex)
      Adds a new node (equal to the snap pt) to the specified segment if the segment passes through the hot pixel
      Parameters:
      segStr -
      segIndex -
      Returns:
      true if a node was added to the segment