class CoordinateArraySequence extends CoordinateSequence with Serializable
A {link CoordinateSequence} backed by an array of {link Coordinate}s. This is the implementation that {link Geometry}s use by default. Coordinates returned by #toArray and #getCoordinate are live -- modifications to them are actually changing the CoordinateSequence's underlying data. A dimension may be specified for the coordinates in the sequence, which may be 2 or 3. The actual coordinates will always have 3 ordinates, but the dimension is useful as metadata in some situations.
- Annotations
- @SerialVersionUID()
- Version
1.7
- Alphabetic
- By Inheritance
- CoordinateArraySequence
- Serializable
- CoordinateSequence
- Cloneable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CoordinateArraySequence(coordSeq: CoordinateSequence)
Creates a new sequence based on a deep copy of the given {link CoordinateSequence}.
Creates a new sequence based on a deep copy of the given {link CoordinateSequence}. The coordinate dimension is set to equal the dimension of the input.
- coordSeq
the coordinate sequence that will be copied.
- new CoordinateArraySequence(size: Int, dimension: Int, measures: Int)
- new CoordinateArraySequence(size: Int, dimension: Int)
Constructs a sequence of a given size, populated with new {link Coordinate}s.
Constructs a sequence of a given size, populated with new {link Coordinate}s.
- size
the size of the sequence to create
- dimension
the dimension of the coordinates
- new CoordinateArraySequence(size: Int)
Constructs a sequence of a given size, populated with new {link Coordinate}s.
Constructs a sequence of a given size, populated with new {link Coordinate}s.
- size
the size of the sequence to create
- new CoordinateArraySequence(coordinates: Array[Coordinate], dimension: Int)
Constructs a sequence based on the given array of {link Coordinate}s (the array is not copied).
Constructs a sequence based on the given array of {link Coordinate}s (the array is not copied).
- coordinates
the coordinate array that will be referenced.
- dimension
the dimension of the coordinates
- new CoordinateArraySequence(coordinates: Array[Coordinate])
Constructs a sequence based on the given array of {link Coordinate}s (the array is not copied).
Constructs a sequence based on the given array of {link Coordinate}s (the array is not copied). The coordinate dimension defaults to 3.
- coordinates
the coordinate array that will be referenced.
- new CoordinateArraySequence(coordinatesArg: Array[Coordinate], dimension: Int = 3, measures: Int = 0)
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 copy: CoordinateArraySequence
Creates a deep copy of the CoordinateArraySequence
Creates a deep copy of the CoordinateArraySequence
return The deep copy
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- def createCoordinate: Coordinate
Creates a coordinate for use in this sequence.
Creates a coordinate for use in this sequence.
The coordinate is created supporting the same number of {link #getDimension()} and {link #getMeasures()} as this sequence and is suitable for use with {link #getCoordinate(int, Coordinate)}.
return coordinate for use with this sequence
- Definition Classes
- CoordinateSequence
- def enforceArrayConsistency(array: Array[Coordinate]): Array[Coordinate]
Ensure array contents of the same type, making use of {link #createCoordinate()} as needed.
Ensure array contents of the same type, making use of {link #createCoordinate()} as needed.
A new array will be created if needed to return a consistent result.
- array
array containing consistent coordinate instances
- Attributes
- protected
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def expandEnvelope(env: Envelope): Envelope
Expands the given {link Envelope} to include the coordinates in the sequence.
Expands the given {link Envelope} to include the coordinates in the sequence. Allows implementing classes to optimize access to coordinate values.
- env
the envelope to expand return a ref to the expanded envelope
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- 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 getCoordinate(index: Int, coord: Coordinate): Unit
- index
the index of the coordinate to copy
- coord
a { @link Coordinate} to receive the value
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- See also
org.locationtech.jts.geom.CoordinateSequence#getX(int)
- def getCoordinate(i: Int): Coordinate
Get the Coordinate with index i.
Get the Coordinate with index i.
- i
the index of the coordinate return the requested Coordinate instance
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- def getCoordinateCopy(i: Int): Coordinate
Get a copy of the Coordinate with index i.
Get a copy of the Coordinate with index i.
- i
the index of the coordinate return a copy of the requested Coordinate
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- def getDimension: Int
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- See also
org.locationtech.jts.geom.CoordinateSequence#getDimension()
- def getM(index: Int): Double
- index
return the value of the M ordinate in the index'th coordinate, or Double.NaN if not defined.
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- See also
org.locationtech.jts.geom.CoordinateSequence#getM(int)
- def getMeasures: Int
Returns the number of measures included in {link #getDimension()} for each coordinate for this sequence.
Returns the number of measures included in {link #getDimension()} for each coordinate for this sequence.
For a measured coordinate sequence a non-zero value is returned.
- For XY sequence measures is zero
- For XYM sequence measure is one -
- For XYZ sequence measure is zero
- For XYZM sequence measure is one
- Values greater than one are supported
return the number of measures included in dimension
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- def getOrdinate(index: Int, ordinateIndex: Int): Double
- index
the coordinate index in the sequence
- ordinateIndex
the ordinate index in the coordinate (in range [0, dimension-1])
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- See also
org.locationtech.jts.geom.CoordinateSequence#getOrdinate(int, int)
- def getX(index: Int): Double
Returns ordinate X (0) of the specified coordinate.
Returns ordinate X (0) of the specified coordinate.
- index
return the value of the X ordinate in the index'th coordinate
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- def getY(index: Int): Double
- index
return the value of the Y ordinate in the index'th coordinate
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- See also
org.locationtech.jts.geom.CoordinateSequence#getY(int)
- def getZ(index: Int): Double
- index
return the value of the Z ordinate in the index'th coordinate, or Double.NaN if not defined.
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- See also
org.locationtech.jts.geom.CoordinateSequence#getZ(int)
- def hasM: Boolean
Tests whether the coordinates in the sequence have measures associated with them.
Tests whether the coordinates in the sequence have measures associated with them. Returns true if {link #getMeasures()} > 0. See {link #getMeasures()} to determine the number of measures present.
return true if { @link #getM(int)} is supported.
- Definition Classes
- CoordinateSequence
- See also
#getMeasures()
#getM(int)
- def hasZ: Boolean
Checks {link #getDimension()} and {link #getMeasures()} to determine if {link #getZ(int)} is supported.
Checks {link #getDimension()} and {link #getMeasures()} to determine if {link #getZ(int)} is supported.
return true if { @link #getZ(int)} is supported.
- Definition Classes
- CoordinateSequence
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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 setOrdinate(index: Int, ordinateIndex: Int, value: Double): Unit
- index
the coordinate index in the sequence
- ordinateIndex
the ordinate index in the coordinate (in range [0, dimension-1])
- value
the new ordinate value
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- See also
org.locationtech.jts.geom.CoordinateSequence#setOrdinate(int, int, double)
- def size: Int
Returns the size of the coordinate sequence
Returns the size of the coordinate sequence
return the number of coordinates
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toCoordinateArray: Array[Coordinate]
This method exposes the internal Array of Coordinate Objects
This method exposes the internal Array of Coordinate Objects
return the Coordinate[] array.
- Definition Classes
- CoordinateArraySequence → CoordinateSequence
- def toString(): String
Returns the string Representation of the coordinate array
Returns the string Representation of the coordinate array
return The string
- Definition Classes
- CoordinateArraySequence → 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()
Deprecated Value Members
- def clone: AnyRef
Creates a deep copy of the Object
Creates a deep copy of the Object
return The deep copy
- Definition Classes
- CoordinateArraySequence → CoordinateSequence → AnyRef
- Deprecated