Class TransformWGS84DutchRDNew


  • public final class TransformWGS84DutchRDNew
    extends java.lang.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 Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.geom.Point2D fromWGS84​(double wgs84East, double wgs84North)
      Convert a coordinate pair in WGS84 coordinates to local coordinates.
      static java.awt.geom.Point2D fromWGS84​(java.awt.geom.Point2D wgs84)
      Convert a coordinate pair in WGS84 coordinates to local coordinates.
      static java.awt.geom.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.
      static java.awt.geom.Point2D toWGS84​(double localX, double localY)
      Convert a coordinate pair in the local system to WGS84 coordinates.
      static java.awt.geom.Point2D toWGS84​(java.awt.geom.Point2D local)
      Convert a coordinate pair in the local system to WGS84 coordinates.
      static java.awt.geom.Rectangle2D toWGS84Bounds()
      Report the bounding box for conversions from the local coordinate system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • toWGS84

        public static java.awt.geom.Point2D toWGS84​(java.awt.geom.Point2D local)
                                             throws java.lang.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:
        java.lang.IllegalArgumentException - when local is not valid in the local system
      • toWGS84

        public static java.awt.geom.Point2D toWGS84​(double localX,
                                                    double localY)
                                             throws java.lang.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:
        java.lang.IllegalArgumentException - when localX, localY is not valid in the local system
      • fromWGS84

        public static java.awt.geom.Point2D fromWGS84​(java.awt.geom.Point2D wgs84)
                                               throws java.lang.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:
        java.lang.IllegalArgumentException - when wgs84 is not valid in the local system
      • fromWGS84

        public static java.awt.geom.Point2D fromWGS84​(double wgs84East,
                                                      double wgs84North)
                                               throws java.lang.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:
        java.lang.IllegalArgumentException - when wgs84 is not valid in the local system
      • fromWGS84Bounds

        public static java.awt.geom.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 java.awt.geom.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