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.algorithm
Class NonRobustCGAlgorithms

    java.lang.Object
      com.vividsolutions.jts.algorithm.CGAlgorithms
          com.vividsolutions.jts.algorithm.NonRobustCGAlgorithms

public class NonRobustCGAlgorithms
extends CGAlgorithms

Non-robust versions of various fundamental Computational Geometric algorithms, FOR TESTING PURPOSES ONLY!. The non-robustness is due to rounding error in floating point computation.

Version:
  1.7

Field Summary

Fields inherited from class com.vividsolutions.jts.algorithm.CGAlgorithms
`CLOCKWISE, COLLINEAR, COUNTERCLOCKWISE, LEFT, RIGHT, STRAIGHT`

Constructor Summary
`NonRobustCGAlgorithms()`

Method Summary
`static int` | `computeOrientation(Coordinate p1, Coordinate p2, Coordinate q)` Computes the orientation of a point q to the directed line segment p1-p2.
`static boolean` | `isCCW(Coordinate[] ring)` Computes whether a ring defined by an array of `Coordinate` is oriented counter-clockwise.
`static boolean` | `isPointInRing(Coordinate p, Coordinate[] ring)` Computes whether a ring defined by an array of `Coordinate` is oriented counter-clockwise.

Methods inherited from class com.vividsolutions.jts.algorithm.CGAlgorithms
`distanceLineLine, distancePointLine, distancePointLinePerpendicular, isOnLine, length, locatePointInRing, orientationIndex, signedArea`

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

Constructor Detail

### NonRobustCGAlgorithms

    public NonRobustCGAlgorithms()

Method Detail

### isPointInRing

    public static boolean isPointInRing(Coordinate p,
                                        Coordinate[] ring)

  Computes whether a ring defined by an array of `Coordinate` is oriented counter-clockwise.

  This will handle coordinate lists which contain repeated points.

  Parameters:
    `ring` - an array of coordinates forming a ring
  Returns:
    `true` if the ring is oriented counter-clockwise.
  Throws:
    `java.lang.IllegalArgumentException` - if the ring is degenerate (does not contain 3 different points)

### isCCW

    public static boolean isCCW(Coordinate[] ring)

  Computes whether a ring defined by an array of `Coordinate` is oriented counter-clockwise.

  This will handle coordinate lists which contain repeated points.

  Parameters:
    `ring` - an array of coordinates forming a ring
  Returns:
    `true` if the ring is oriented counter-clockwise.
  Throws:
    `java.lang.IllegalArgumentException` - if the ring is degenerate (does not contain 3 different points)

### computeOrientation

    public static int computeOrientation(Coordinate p1,
                                         Coordinate p2,
                                         Coordinate q)

  Description copied from class: `CGAlgorithms`
  Computes the orientation of a point q to the directed line segment p1-p2. The orientation of a point relative to a directed line segment indicates which way you turn to get to q after travelling from p1 to p2.

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