Class ExtendedCoordinateSequenceFactory
java.lang.Object
org.locationtech.jtsexample.geom.ExtendedCoordinateSequenceFactory
- All Implemented Interfaces:
CoordinateSequenceFactory
Creates ExtendedCoordinateSequenceFactory internally represented
as an array of
ExtendedCoordinates.- Version:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptioncreate(int size, int dimension) Creates aCoordinateSequenceof the specified size and dimension.create(int size, int dimension, int measures) Creates aCoordinateSequenceof the specified size and dimension with measure support.create(Coordinate[] coordinates) Returns an ExtendedCoordinateSequence based on the given array -- the array is used directly if it is an instance of ExtendedCoordinate[]; otherwise it is copied.create(CoordinateSequence coordSeq) Creates aCoordinateSequencewhich is a copy of the givenCoordinateSequence.instance()Returns the singleton instance of ExtendedCoordinateSequenceFactory
-
Method Details
-
instance
Returns the singleton instance of ExtendedCoordinateSequenceFactory -
create
Returns an ExtendedCoordinateSequence based on the given array -- the array is used directly if it is an instance of ExtendedCoordinate[]; otherwise it is copied.- Specified by:
createin interfaceCoordinateSequenceFactory- Parameters:
coordinates- the coordinates
-
create
Description copied from interface:CoordinateSequenceFactoryCreates aCoordinateSequencewhich is a copy of the givenCoordinateSequence. This method must handle null arguments by creating an empty sequence.- Specified by:
createin interfaceCoordinateSequenceFactory- Parameters:
coordSeq- the coordinate sequence to copy
-
create
Description copied from interface:CoordinateSequenceFactoryCreates aCoordinateSequenceof the specified size and dimension. For this to be useful, theCoordinateSequenceimplementation must be mutable.If the requested dimension is larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.
- Specified by:
createin interfaceCoordinateSequenceFactory- Parameters:
size- the number of coordinates in the sequencedimension- the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)- See Also:
-
create
Description copied from interface:CoordinateSequenceFactoryCreates aCoordinateSequenceof the specified size and dimension with measure support. For this to be useful, theCoordinateSequenceimplementation must be mutable.If the requested dimension or measures are larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.
- Specified by:
createin interfaceCoordinateSequenceFactory- Parameters:
size- the number of coordinates in the sequencedimension- the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)measures- the number of measures of the coordinates in the sequence (if user-specifiable, otherwise ignored)
-