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
Class IntersectionAdder

    java.lang.Object
      com.vividsolutions.jts.noding.IntersectionAdder

All Implemented Interfaces:
  SegmentIntersector

public class IntersectionAdder
extends java.lang.Object
implements SegmentIntersector

Computes the intersections between two line segments in `SegmentString`s and adds them to each string. The `SegmentIntersector` is passed to a `Noder`. The `addIntersections` method is called whenever the `Noder` detects that two SegmentStrings might intersect. This class is an example of the Strategy pattern.

Version:
  1.7

Field Summary
`int` | `numInteriorIntersections`
`int` | `numIntersections`
`int` | `numProperIntersections`
`int` | `numTests`

Constructor Summary
`IntersectionAdder(LineIntersector li)`

Method Summary
`LineIntersector` | `getLineIntersector()`
`Coordinate` | `getProperIntersectionPoint()`
`boolean` | `hasInteriorIntersection()` An interior intersection is an intersection which is in the interior of some segment.
`boolean` | `hasIntersection()`
`boolean` | `hasProperInteriorIntersection()` A proper interior intersection is a proper intersection which is not contained in the set of boundary nodes set for this SegmentIntersector.
`boolean` | `hasProperIntersection()` A proper intersection is an intersection which is interior to at least two line segments.
`static boolean` | `isAdjacentSegments(int i1, int i2)`
`boolean` | `isDone()` Always process all intersections
`void` | `processIntersections(SegmentString e0, int segIndex0, SegmentString e1, int segIndex1)` This method is called by clients of the `SegmentIntersector` class to process intersections for two segments of the `SegmentStrings` being intersected.

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

Field Detail

### numIntersections

    public int numIntersections

### numInteriorIntersections

    public int numInteriorIntersections

### numProperIntersections

    public int numProperIntersections

### numTests

    public int numTests

Constructor Detail

### IntersectionAdder

    public IntersectionAdder(LineIntersector li)

Method Detail

### isAdjacentSegments

    public static boolean isAdjacentSegments(int i1,
                                             int i2)

### getLineIntersector

    public LineIntersector getLineIntersector()

### getProperIntersectionPoint

    public Coordinate getProperIntersectionPoint()

  Returns:
    the proper intersection point, or `null` if none was found

### hasIntersection

    public boolean hasIntersection()

### hasProperIntersection

    public boolean hasProperIntersection()

  A proper intersection is an intersection which is interior to at least two line segments. Note that a proper intersection is not necessarily in the interior of the entire Geometry, since another edge may have an endpoint equal to the intersection, which according to SFS semantics can result in the point being on the Boundary of the Geometry.

### hasProperInteriorIntersection

    public boolean hasProperInteriorIntersection()

  A proper interior intersection is a proper intersection which is not contained in the set of boundary nodes set for this SegmentIntersector.

### hasInteriorIntersection

    public boolean hasInteriorIntersection()

  An interior intersection is an intersection which is in the interior of some segment.

### processIntersections

    public void processIntersections(SegmentString e0,
                                     int segIndex0,
                                     SegmentString e1,
                                     int segIndex1)

  This method is called by clients of the `SegmentIntersector` class to process intersections for two segments of the `SegmentStrings` being intersected. Note that some clients (such as `MonotoneChain`s) may optimize away this call for segment pairs which they have determined do not intersect (e.g. by an disjoint envelope test).

  Specified by:
    `processIntersections` in interface `SegmentIntersector`

### isDone

    public boolean isDone()

  Always process all intersections

  Specified by:
    `isDone` in interface `SegmentIntersector`
  Returns:
    false always

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