object CoordinateArrays
Useful utility functions for handling Coordinate arrays
- Version
1.7
- Alphabetic
- By Inheritance
- CoordinateArrays
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class BidirectionalComparator extends Comparator[Array[Coordinate]]
A {link Comparator} for {link Coordinate} arrays modulo their directionality.
A {link Comparator} for {link Coordinate} arrays modulo their directionality. E.g. if two coordinate arrays are identical but reversed they will compare as equal under this ordering. If the arrays are not equal, the ordering returned is the ordering in the forward direction.
- class ForwardComparator extends Comparator[Array[Coordinate]]
A {link Comparator} for {link Coordinate} arrays in the forward direction of their coordinates, using lexicographic ordering.
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 atLeastNCoordinatesOrNothing(n: Int, c: Array[Coordinate]): Array[Coordinate]
Returns either the given coordinate array if its length is greater than the given amount, or an empty coordinate array.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compare(pts1: Array[Coordinate], pts2: Array[Coordinate]): Int
Compares two {link Coordinate} arrays in the forward direction of their coordinates, using lexicographic ordering.
Compares two {link Coordinate} arrays in the forward direction of their coordinates, using lexicographic ordering.
- pts2
return an integer indicating the order
- def copyDeep(src: Array[Coordinate], srcStart: Int, dest: Array[Coordinate], destStart: Int, length: Int): Unit
Creates a deep copy of a given section of a source {link Coordinate} array into a destination Coordinate array.
Creates a deep copy of a given section of a source {link Coordinate} array into a destination Coordinate array. The destination array must be an appropriate size to receive the copied coordinates.
- src
an array of Coordinates
- srcStart
the index to start copying from
- dest
the
- destStart
the destination index to start copying to
- length
the number of items to copy
- def copyDeep(coordinates: Array[Coordinate]): Array[Coordinate]
Creates a deep copy of the argument {link Coordinate} array.
Creates a deep copy of the argument {link Coordinate} array.
- coordinates
an array of Coordinates return a deep copy of the input
- def dimension(pts: Array[Coordinate]): Int
Determine dimension based on subclass of {link Coordinate}.
Determine dimension based on subclass of {link Coordinate}.
- pts
supplied coordinates return number of ordinates recorded
- def envelope(coordinates: Array[Coordinate]): Envelope
Computes the envelope of the coordinates.
Computes the envelope of the coordinates.
- coordinates
the coordinates to scan return the envelope of the coordinates
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(coord1: Array[Coordinate], coord2: Array[Coordinate], coordinateComparator: Comparator[Coordinate]): Boolean
Returns true if the two arrays are identical, both null, or pointwise equal, using a user-defined {link Comparator} for {link Coordinate} s
Returns true if the two arrays are identical, both null, or pointwise equal, using a user-defined {link Comparator} for {link Coordinate} s
- coord1
an array of Coordinates
- coord2
an array of Coordinates
- coordinateComparator
a Comparator for Coordinates
- def equals(coord1: Array[Coordinate], coord2: Array[Coordinate]): Boolean
Returns true if the two arrays are identical, both null, or pointwise equal (as compared using Coordinate#equals)
Returns true if the two arrays are identical, both null, or pointwise equal (as compared using Coordinate#equals)
- See also
Coordinate#equals(Object)
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def extract(pts: Array[Coordinate], startArg: Int, endArg: Int): Array[Coordinate]
Extracts a subsequence of the input {link Coordinate} array from indices
starttoend(inclusive).Extracts a subsequence of the input {link Coordinate} array from indices
starttoend(inclusive). The input indices are clamped to the array size; If the end index is less than the start index, the extracted array will be empty.- pts
the input array
- 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 hasRepeatedPoints(coord: Array[Coordinate]): Boolean
Returns whether #equals returns true for any two consecutive Coordinates in the given array.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def increasingDirection(pts: Array[Coordinate]): Int
Determines which orientation of the {link Coordinate} array is (overall) increasing.
Determines which orientation of the {link Coordinate} array is (overall) increasing. In other words, determines which end of the array is "smaller" (using the standard ordering on {link Coordinate}). Returns an integer indicating the increasing direction. If the sequence is a palindrome, it is defined to be oriented in a positive direction.
- pts
the array of Coordinates to test return
1if the array is smaller at the start or is a palindrome,-1if smaller at the end
- def indexOf(coordinate: Coordinate, coordinates: Array[Coordinate]): Int
Returns the index of
coordinateincoordinates.Returns the index of
coordinateincoordinates. The first position is 0; the second, 1; etc.- coordinate
the
Coordinateto search for- coordinates
the array to search return the position of
coordinate, or -1 if it is not found
- def intersection(coordinates: Array[Coordinate], env: Envelope): Array[Coordinate]
Extracts the coordinates which intersect an {link Envelope}
Extracts the coordinates which intersect an {link Envelope}
- coordinates
the coordinates to scan
- env
the envelope to intersect with return an array of the coordinates which intersect the envelope
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isRing(pts: Array[Coordinate]): Boolean
Tests whether an array of {link Coordinate}s forms a ring, by checking length and closure.
Tests whether an array of {link Coordinate}s forms a ring, by checking length and closure. Self-intersection is not checked.
- pts
an array of Coordinates return true if the coordinate form a ring.
- def measures(pts: Array[Coordinate]): Int
Determine number of measures based on subclass of {link Coordinate}.
Determine number of measures based on subclass of {link Coordinate}.
- pts
supplied coordinates return number of measures recorded
- def minCoordinate(coordinates: Array[Coordinate]): Coordinate
Returns the minimum coordinate, using the usual lexicographic comparison.
Returns the minimum coordinate, using the usual lexicographic comparison.
- coordinates
the array to search return the minimum coordinate in the array, found using
compareTo
- See also
Coordinate#compareTo(Object)
- 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()
- def ptNotInList(testPts: Array[Coordinate], pts: Array[Coordinate]): Coordinate
Finds a point in a list of points which is not contained in another list of points
Finds a point in a list of points which is not contained in another list of points
- testPts
the { @link Coordinate}s to test
- pts
an array of { @link Coordinate}s to test the input points against return a { @link Coordinate} from
testPtswhich is not inpts, ' ornull
- def removeNull(coord: Array[Coordinate]): Array[Coordinate]
Collapses a coordinate array to remove all null elements.
Collapses a coordinate array to remove all null elements.
- coord
the coordinate array to collapse return an array containing only non-null elements
- def removeRepeatedPoints(coord: Array[Coordinate]): Array[Coordinate]
If the coordinate array argument has repeated points, constructs a new array containing no repeated points.
If the coordinate array argument has repeated points, constructs a new array containing no repeated points. Otherwise, returns the argument.
- See also
#hasRepeatedPoints(Coordinate[])
- def reverse(coord: Array[Coordinate]): Unit
Reverses the coordinates in an array in-place.
- def scroll(coordinates: Array[Coordinate], firstCoordinate: Coordinate): Unit
Shifts the positions of the coordinates until
firstCoordinateis first.Shifts the positions of the coordinates until
firstCoordinateis first.- coordinates
the array to rearrange
- firstCoordinate
the coordinate to make first
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toCoordinateArray(coordList: Collection[_]): Array[Coordinate]
Converts the given Collection of Coordinates into a Coordinate array.
- 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()