object Orientation

Functions to compute the orientation of basic geometric structures including point triplets (triangles) and rings. Orientation is a fundamental property of planar geometries (and more generally geometry on two-dimensional manifolds).

Orientation is notoriously subject to numerical precision errors in the case of collinear or nearly collinear points. JTS uses extended-precision arithmetic to increase the robustness of the computation.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Orientation
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val CLOCKWISE: Int

    A value that indicates an orientation of clockwise, or a right turn.

  5. val COLLINEAR: Int

    A value that indicates an orientation of collinear, or no turn (straight).

  6. val COUNTERCLOCKWISE: Int

    A value that indicates an orientation of counterclockwise, or a left turn.

  7. val LEFT: Int
  8. val RIGHT: Int
  9. val STRAIGHT: Int
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def index(p1: Coordinate, p2: Coordinate, q: Coordinate): Int

    Returns the orientation index of the direction of the point q relative to a directed infinite line specified by p1-p2.

    Returns the orientation index of the direction of the point q relative to a directed infinite line specified by p1-p2. The index indicates whether the point lies to the {link #LEFT} or {link #RIGHT} of the line, or lies on it {link #COLLINEAR}. The index also indicates the orientation of the triangle formed by the three points ( {link #COUNTERCLOCKWISE}, {link #CLOCKWISE}, or {link #STRAIGHT} )

    p1

    the origin point of the line vector

    p2

    the final point of the line vector

    q

    the point to compute the direction to return -1 ( { @link #CLOCKWISE} or { @link #RIGHT} ) if q is clockwise (right) from p1-p2; 1 ( { @link #COUNTERCLOCKWISE} or { @link #LEFT} ) if q is counter-clockwise (left) from p1-p2; 0 ( { @link #COLLINEAR} or { @link #STRAIGHT} ) if q is collinear with p1-p2

  18. def isCCW(ring: CoordinateSequence): Boolean

    Computes whether a ring defined by an {link CoordinateSequence} is oriented counter-clockwise.

    Computes whether a ring defined by an {link CoordinateSequence} is oriented counter-clockwise.

    • The list of points is assumed to have the first and last points equal.
    • This will handle coordinate lists which contain repeated points.

    This algorithm is only guaranteed to work with valid rings. If the ring is invalid (e.g. self-crosses or touches), the computed result may not be correct.

    ring

    a CoordinateSequence forming a ring return true if the ring is oriented counter-clockwise. throws IllegalArgumentException if there are too few points to determine orientation (< 4)

  19. def isCCW(ring: Array[Coordinate]): Boolean

    Computes whether a ring defined by an array of {link Coordinate}s is oriented counter-clockwise.

    Computes whether a ring defined by an array of {link Coordinate}s is oriented counter-clockwise.

    • The list of points is assumed to have the first and last points equal.
    • This will handle coordinate lists which contain repeated points.

    This algorithm is only guaranteed to work with valid rings. If the ring is invalid (e.g. self-crosses or touches), the computed result may not be correct.

    ring

    an array of Coordinates forming a ring return true if the ring is oriented counter-clockwise. throws IllegalArgumentException if there are too few points to determine orientation (< 4)

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped