Class Positions


  • public class Positions
    extends Object
    Factories for creating Positions.
    Author:
    Karel Maesen, Geovise BVBA creation-date: 4/3/14
    • Constructor Detail

      • Positions

        public Positions()
    • Method Detail

      • mkPosition

        public static <P extends Position> P mkPosition​(Class<P> pClass,
                                                        double... coordinates)
        Factory method for Positions in the reference system. The coordinates array should be in normalized order. See Position
        Parameters:
        coordinates - the coordinates of the position
        Returns:
        the Position with the specified coordinates.
      • copy

        public static <Q extends Position,​P extends PositionPositionSequence<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 of Position
        Returns:
        a copy of the source positions