Interface PositionFactory

    • Method Detail

      • getPrecision

        Precision getPrecision()
        The Precision used used by direct positions created via this factory.

        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.

      • createDirectPosition

        DirectPosition createDirectPosition​(double[] coordinates)
                                     throws MismatchedDimensionException
        Creates a direct position at the specified location specified by coordinates.

        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.

        Parameters:
        coordinates - Array of ordinates used for this DirectPosition
        Throws:
        MismatchedDimensionException - if the coordinates array length doesn't match the coordinate reference system dimension.
      • createPosition

        Position createPosition​(Position position)
        Constructs a position from an other position by copying the coordinate values of the position. There will be no further reference to the position instance.
        Parameters:
        position - A position.
        Returns:
        the position which defines the coordinates for the other position.
      • createPointArray

        PointArray createPointArray()
        Creates a (possibiliy optimized) list for positions. The list is initially empty. New direct positions can be stored using the List.add(E) method.
      • createPointArray

        PointArray createPointArray​(double[] coordinates,
                                    int start,
                                    int length)
        Creates a list for positions initialised from the specified values.

        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.

        Parameters:
        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.
        Returns:
        The list of positions.
      • createPointArray

        PointArray createPointArray​(float[] coordinates,
                                    int start,
                                    int length)
        Creates a list for positions initialized from the specified values.

        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.

        Parameters:
        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.
        Returns:
        The list of positions.