Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.noding.snapround
Class SimpleSnapRounder

    java.lang.Object
      com.vividsolutions.jts.noding.snapround.SimpleSnapRounder

All Implemented Interfaces:
  Noder

public class SimpleSnapRounder
extends java.lang.Object
implements Noder

Uses Snap Rounding to compute a rounded, fully noded arrangement from a set of `SegmentString`s. Implements the Snap Rounding technique described in Hobby, Guibas & Marimont, and Goodrich et al. Snap Rounding assumes that all vertices lie on a uniform grid (hence the precision model of the input must be fixed precision, and all the input vertices must be rounded to that precision).

This implementation uses simple iteration over the line segments.

This implementation appears to be fully robust using an integer precision model. It will function with non-integer precision models, but the results are not 100% guaranteed to be correctly noded.

Version:
  1.7

Constructor Summary
`SimpleSnapRounder(PrecisionModel pm)`

Method Summary
`static boolean` | `addSnappedNode(HotPixel hotPix, SegmentString segStr, int segIndex)` Adds a new node (equal to the snap pt) to the segment if the segment passes through the hot pixel
`void` | `computeNodes(java.util.Collection inputSegmentStrings)` Computes the noding for a collection of `SegmentString`s.
`void` | `computeVertexSnaps(java.util.Collection edges)` Computes nodes introduced as a result of snapping segments to vertices of other segments
`java.util.Collection` | `getNodedSubstrings()` Returns a `Collection` of fully noded `SegmentStrings`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleSnapRounder

    public SimpleSnapRounder(PrecisionModel pm)

Method Detail

### getNodedSubstrings

    public java.util.Collection getNodedSubstrings()

  Description copied from interface: `Noder`
  Returns a `Collection` of fully noded `SegmentStrings`. The SegmentStrings have the same context as their parent.

  Specified by:
    `getNodedSubstrings` in interface `Noder`
  Returns:
    a Collection of SegmentStrings

### computeNodes

    public void computeNodes(java.util.Collection inputSegmentStrings)

  Description copied from interface: `Noder`
  Computes the noding for a collection of `SegmentString`s. Some Noders may add all these nodes to the input SegmentStrings; others may only add some or none at all.

  Specified by:
    `computeNodes` in interface `Noder`
  Parameters:
    `inputSegmentStrings` - a collection of `SegmentString`s to node

### computeVertexSnaps

    public void computeVertexSnaps(java.util.Collection edges)

  Computes nodes introduced as a result of snapping segments to vertices of other segments

### addSnappedNode

    public static boolean addSnappedNode(HotPixel hotPix,
                                         SegmentString segStr,
                                         int segIndex)

  Adds a new node (equal to the snap pt) to the segment if the segment passes through the hot pixel

  Parameters:
    `hotPix` -
    `segStr` -
    `segIndex` -
  Returns:
    `true` if a node was added

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD