o

org.locationtech.jts.geom

CoordinateArrays

object CoordinateArrays

Useful utility functions for handling Coordinate arrays

Version

1.7

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

Type Members

  1. 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.

  2. 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

  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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. 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

  14. 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)

  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def extract(pts: Array[Coordinate], startArg: Int, endArg: Int): Array[Coordinate]

    Extracts a subsequence of the input {link Coordinate} array from indices start to end (inclusive).

    Extracts a subsequence of the input {link Coordinate} array from indices start to end (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

  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def hasRepeatedPoints(coord: Array[Coordinate]): Boolean

    Returns whether #equals returns true for any two consecutive Coordinates in the given array.

  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. 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 1 if the array is smaller at the start or is a palindrome, -1 if smaller at the end

  22. def indexOf(coordinate: Coordinate, coordinates: Array[Coordinate]): Int

    Returns the index of coordinate in coordinates.

    Returns the index of coordinate in coordinates. The first position is 0; the second, 1; etc.

    coordinate

    the Coordinate to search for

    coordinates

    the array to search return the position of coordinate, or -1 if it is not found

  23. 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

  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. 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.

  26. 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

  27. 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)

  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. 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 testPts which is not in pts, ' or null

  32. 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

  33. 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[])

  34. def reverse(coord: Array[Coordinate]): Unit

    Reverses the coordinates in an array in-place.

  35. def scroll(coordinates: Array[Coordinate], firstCoordinate: Coordinate): Unit

    Shifts the positions of the coordinates until firstCoordinate is first.

    Shifts the positions of the coordinates until firstCoordinate is first.

    coordinates

    the array to rearrange

    firstCoordinate

    the coordinate to make first

  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toCoordinateArray(coordList: Collection[_]): Array[Coordinate]

    Converts the given Collection of Coordinates into a Coordinate array.

  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped