Class AbstractCoordinateSet
Object
AbstractCoordinateSet
- All Implemented Interfaces:
Serializable
,Iterable<DirectPosition>
public abstract class AbstractCoordinateSet
extends Object
implements Iterable<DirectPosition>, Serializable
Skeletal implementation of a collection of coordinate tuples referenced to the same CRS and epoch.
This implementation is serializable if the coordinate metadata given at construction time is also serializable.
Future evolution
This class is expected to implement aCoordinateSet
interface after the next GeoAPI release.- Since:
- 1.5
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new set of coordinate tuples. -
Method Summary
Modifier and TypeMethodDescriptionReturns the coordinate metadata to which this coordinate set is referenced.int
Returns the number of dimensions of coordinate tuples.abstract Iterator
<DirectPosition> iterator()
Returns the positions described by coordinate tuples.stream()
Returns a stream of coordinate tuples.Returns a string representation of this coordinate set for debugging purposes.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
AbstractCoordinateSet
Creates a new set of coordinate tuples.- Parameters:
metadata
- coordinate reference system and epoch (if dynamic) of this coordinate set.
-
-
Method Details
-
getCoordinateMetadata
Returns the coordinate metadata to which this coordinate set is referenced.Upcoming API change
DefaultCoordinateMetadata
class may be replaced byCoordinateMetadata
interface after upgrade to GeoAPI 3.1.- Returns:
- coordinate metadata to which this coordinate set is referenced.
-
getDimension
public int getDimension()Returns the number of dimensions of coordinate tuples. This is determined by the coordinate reference system.- Returns:
- the number of dimensions of coordinate tuples.
-
iterator
@UML(identifier="coordinateTuple", obligation=MANDATORY, specification=ISO_19111) public abstract Iterator<DirectPosition> iterator()Returns the positions described by coordinate tuples.- Specified by:
iterator
in interfaceIterable<DirectPosition>
- Returns:
- position described by coordinate tuples.
-
stream
Returns a stream of coordinate tuples. Whether the stream is sequential or parallel is implementation dependent. The default implementation creates a sequential stream.- Returns:
- a sequential or parallel stream of coordinate tuples.
-
toString
-