public interface PositionFactory
This factory will be created for a known Coordinate Reference System and precision model.
Modifier and Type | Method and Description |
---|---|
DirectPosition |
createDirectPosition(double[] coordinates)
Creates a direct position at the specified location specified by coordinates.
|
PointArray |
createPointArray()
Creates a (possibiliy optimized) list for positions.
|
PointArray |
createPointArray(double[] coordinates,
int start,
int length)
Creates a list for positions initialised from the specified values.
|
PointArray |
createPointArray(float[] coordinates,
int start,
int length)
Creates a list for positions initialized from the specified values.
|
Position |
createPosition(Position position)
Constructs a position from an other position by copying the coordinate values of the
position.
|
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the coordinate reference system in use for all direct
positions to be created through this interface.
|
Precision |
getPrecision()
The Precision used used by direct positions created via this
factory.
|
CoordinateReferenceSystem getCoordinateReferenceSystem()
Precision getPrecision()
The Precision is used to inform topological operations of the number of significant digits
maintained by the DirectPosition
instances. This information both helps operations
stop when the correct level of detail is reached, and ensure the result will be valid when
rounded to the required precision.
DirectPosition createDirectPosition(double[] coordinates) throws MismatchedDimensionException
Implementations have the option of taking ownership of the provided coordinate array. You should not attempt to reuse this array after it has been provided to this factory method.
coordinates
- Array of ordinates used for this DirectPositionMismatchedDimensionException
- if the coordinates array length doesn't match the
coordinate reference system dimension.Position createPosition(Position position)
position
- A position.PointArray createPointArray()
List.add(E)
method.PointArray createPointArray(double[] coordinates, int start, int length)
Implementations have the option of taking ownership of the provided coordinate array. You should not attempt to reuse this array after it has been provided to this factory method.
coordinates
- The coordinates to assign to the list of positions.start
- The first valid value in the coordinates
array.length
- The number of valid values in the coordinates
array.PointArray createPointArray(float[] coordinates, int start, int length)
Implementations have the option of taking ownership of the provided coordinate array. You should not attempt to reuse this array after it has been provided to this factory method.
coordinates
- The coordinates to assign to the list of positions.start
- The first valid value in the coordinates
array.length
- The number of valid values in the coordinates
array.Copyright © 1996–2019 Geotools. All rights reserved.