Class TransformWGS84DutchRDNew


  • public final class TransformWGS84DutchRDNew
    extends Object
    Convert geographical coordinates between WGS84 and the Dutch RD (Rijksdriehoek) system.
    Specific MathTransform for WGS84 (EPSG:4326) to RD_new (EPSG:28992) conversions. Code based on C code by Peter Knoppers as applied here, which is based on this paper.

    Copyright (c) ~2000-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version Aug 4, 2016
    Author:
    Alexander Verbraeck, Peter Knoppers, Gert-Jan Stolk
    • Method Detail

      • toWGS84

        public static Point2D toWGS84​(Point2D local)
                               throws IllegalArgumentException
        Convert a coordinate pair in the local system to WGS84 coordinates.
        Parameters:
        local - Point2D; coordinates in the local system.
        Returns:
        Point2D; the equivalent location in degrees in the WGS84 coordinate system
        Throws:
        IllegalArgumentException - when local is not valid in the local system
      • toWGS84

        public static Point2D toWGS84​(double localX,
                                      double localY)
                               throws IllegalArgumentException
        Convert a coordinate pair in the local system to WGS84 coordinates.
        Parameters:
        localX - double; X-coordinate in the local system
        localY - double; Y-coordinate in the local system
        Returns:
        Point2D; the equivalent location in degrees in the WGS84 coordinate system
        Throws:
        IllegalArgumentException - when localX, localY is not valid in the local system
      • fromWGS84

        public static Point2D fromWGS84​(Point2D wgs84)
                                 throws IllegalArgumentException
        Convert a coordinate pair in WGS84 coordinates to local coordinates.
        Parameters:
        wgs84 - Point2D; coordinates in degrees in the WGS84 coordinate system
        Returns:
        Point2D; the equivalent location in the local coordinate system
        Throws:
        IllegalArgumentException - when wgs84 is not valid in the local system
      • fromWGS84

        public static Point2D fromWGS84​(double wgs84East,
                                        double wgs84North)
                                 throws IllegalArgumentException
        Convert a coordinate pair in WGS84 coordinates to local coordinates.
        Parameters:
        wgs84East - double; East coordinate in degrees in the WGS84 system (negative value indicates West)
        wgs84North - double; North coordinate in degrees in the WGS84 system (negative value indicates South)
        Returns:
        Point2D; the equivalent location in the local coordinate system
        Throws:
        IllegalArgumentException - when wgs84 is not valid in the local system
      • fromWGS84Bounds

        public static Rectangle2D fromWGS84Bounds()
        Report the bounding box for conversion to the local coordinate system.
        Conversions from WGS84 to the local coordinate system should fail for locations outside this bounding box. If the valid range is not adequately described by a rectangular bounding box, conversions for some areas within this bounding box may also fail (with an IllegalArgumentException). There is no guarantee that the result of a conversion lies within the bounding box for the reverse conversion.
        Returns:
        Rectangle2D; bounding box in WGS84 degrees
      • toWGS84Bounds

        public static Rectangle2D toWGS84Bounds()
        Report the bounding box for conversions from the local coordinate system.
        Conversions from the local coordinate system to WGS84 should fail for locations outside this bounding box. If the valid range is not adequately described by a rectangular bounding box, conversions for some areas within this bounding box may also fail (with an IllegalArgumentException). There is no guarantee that the result of a conversion lies within the bounding box for the reverse conversion.
        Returns:
        Rectangle2D; bounding box of the local coordinate system