Class MCIndexPointSnapper.HotPixelSnapAction
java.lang.Object
org.locationtech.jts.index.chain.MonotoneChainSelectAction
org.locationtech.jts.noding.snapround.MCIndexPointSnapper.HotPixelSnapAction
- Enclosing class:
MCIndexPointSnapper
- Version:
- 1.7
-
Constructor Summary
ConstructorsConstructorDescriptionHotPixelSnapAction(HotPixel hotPixel, SegmentString parentEdge, int hotPixelVertexIndex) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddSnappedNode(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 pixelbooleanReports whether the HotPixel caused a node to be added in any target segmentString (including its own).voidselect(MonotoneChain mc, int startIndex) Check if a segment of the monotone chain intersects the hot pixel vertex and introduce a snap node if so.Methods inherited from class MonotoneChainSelectAction
select
-
Constructor Details
-
HotPixelSnapAction
-
-
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
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:
selectin classMonotoneChainSelectAction- Parameters:
mc- the parent chainstartIndex- the index of the start vertex of the segment being processed
-
addSnappedNode
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
-