Package org.geolatte.geom
Class Positions
- java.lang.Object
-
- org.geolatte.geom.Positions
-
public class Positions extends Object
Factories for creating Positions.- Author:
- Karel Maesen, Geovise BVBA creation-date: 4/3/14
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPositions.CanMakeG2Dstatic classPositions.CanMakeG2DMstatic classPositions.CanMakeG3Dstatic classPositions.CanMakeG3DMstatic classPositions.CanMakeP2Dstatic classPositions.CanMakeP2DMstatic classPositions.CanMakeP3Dstatic classPositions.CanMakeP3DM
-
Field Summary
Fields Modifier and Type Field Description static List<PositionFactory<?>>registeredFactories
-
Constructor Summary
Constructors Constructor Description Positions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <P extends Position>
PositionSequence<P>collect(Class<P> positionType, P... positions)static <Q extends Position,P extends Position>
PositionSequence<P>copy(PositionSequence<Q> source, Class<P> targetPosClass)Copies the source positions to a new PositionSequence.static <P extends Position>
PositionFactory<P>getFactoryFor(Class<P> pClass)static <P extends Position>
PmkPosition(Class<P> pClass, double... coordinates)Factory method forPositions in the reference system.static <P extends Position>
PmkPosition(CoordinateReferenceSystem<P> crs, double... coordinates)
-
-
-
Field Detail
-
registeredFactories
public static List<PositionFactory<?>> registeredFactories
-
-
Method Detail
-
mkPosition
public static <P extends Position> P mkPosition(Class<P> pClass, double... coordinates)
Factory method forPositions in the reference system. The coordinates array should be in normalized order. SeePosition- Parameters:
coordinates- the coordinates of the position- Returns:
- the
Positionwith the specified coordinates.
-
mkPosition
public static <P extends Position> P mkPosition(CoordinateReferenceSystem<P> crs, double... coordinates)
-
collect
public static <P extends Position> PositionSequence<P> collect(Class<P> positionType, P... positions)
-
getFactoryFor
public static <P extends Position> PositionFactory<P> getFactoryFor(Class<P> pClass)
-
copy
public static <Q extends Position,P extends Position> PositionSequence<P> copy(PositionSequence<Q> source, Class<P> targetPosClass)
Copies the source positions to a new PositionSequence.The coordinates are taken as-is. If the target coordinate reference systems has a larger coordinate dimensions then the source, NaN coordinate values are created.
- Type Parameters:
P-- Parameters:
source-targetPosClass- target type ofPosition- Returns:
- a copy of the source positions
-
-