Class TransformWgs84DutchRdNew

java.lang.Object
org.opentrafficsim.animation.gis.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-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Gert-Jan Stolk
  • Method Summary

    Modifier and Type
    Method
    Description
    static Point2D
    fromWgs84(double wgs84East, double wgs84North)
    Convert a coordinate pair in WGS84 coordinates to local coordinates.
    static Point2D
    Convert a coordinate pair in WGS84 coordinates to local coordinates.
    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 Point2D
    toWgs84(double localX, double localY)
    Convert a coordinate pair in the local system to WGS84 coordinates.
    static Point2D
    Convert a coordinate pair in the local system to WGS84 coordinates.
    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 Details

    • 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