com.vividsolutions.jts.noding.snapround

Class MCIndexPointSnapper


public class MCIndexPointSnapper
extends java.lang.Object

"Snaps" all SegmentStrings in a SpatialIndex containing MonotoneChains to a given HotPixel.
Version:
1.7

Nested Class Summary

class
MCIndexPointSnapper.HotPixelSnapAction

Field Summary

static int
nSnaps

Constructor Summary

MCIndexPointSnapper(Collection monoChains, SpatialIndex index)

Method Summary

boolean
snap(HotPixel hotPixel)
boolean
snap(HotPixel hotPixel, SegmentString parentEdge, int vertexIndex)
Snaps (nodes) all interacting segments to this hot pixel.

Field Details

nSnaps

public static int nSnaps

Constructor Details

MCIndexPointSnapper

public MCIndexPointSnapper(Collection monoChains,
                           SpatialIndex index)

Method Details

snap

public boolean snap(HotPixel hotPixel)

snap

public boolean snap(HotPixel hotPixel,
                    SegmentString parentEdge,
                    int vertexIndex)
Snaps (nodes) all interacting segments to this hot pixel. The hot pixel may represent a vertex of an edge, in which case this routine uses the optimization of not noding the vertex itself
Parameters:
hotPixel - the hot pixel to snap to
parentEdge - the edge containing the vertex, if applicable, or null
vertexIndex - the index of the vertex, if applicable, or -1
Returns:
true if a node was added for this pixel