object RayCrossingCounter
Counts the number of segments crossed by a horizontal ray extending to the right from a given point, in an incremental fashion. This can be used to determine whether a point lies in a {link Polygonal} geometry. The class determines the situation where the point lies exactly on a segment. When being used for Point-In-Polygon determination, this case allows short-circuiting the evaluation.
This class handles polygonal geometries with any number of shells and holes. The orientation of the shell and hole rings is unimportant. In order to compute a correct location for a given polygonal geometry, it is essential that all segments are counted which
- touch the ray
- lie in in any ring which may contain the point
The only exception is when the point-on-segment situation is detected, in which case no further processing is required. The implication of the above rule is that segments which can be a priori determined to not touch the ray (i.e. by a test of their bounding box or Y-extent) do not need to be counted. This allows for optimization by indexing.
This implementation uses the extended-precision orientation test, to provide maximum robustness and consistency within other algorithms.
- Alphabetic
- By Inheritance
- RayCrossingCounter
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def locatePointInRing(p: Coordinate, ring: CoordinateSequence): Int
Determines the {link Location} of a point in a ring.
Determines the {link Location} of a point in a ring.
- p
the point to test
- ring
a coordinate sequence forming a ring return the location of the point in the ring
- def locatePointInRing(p: Coordinate, ring: Array[Coordinate]): Int
Determines the {link Location} of a point in a ring.
Determines the {link Location} of a point in a ring. This method is an exemplar of how to use this class.
- p
the point to test
- ring
an array of Coordinates forming a ring return the location of the point in the ring
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()