Class CoordinateTransformLonLatToXy

java.lang.Object
org.opentrafficsim.animation.gis.CoordinateTransformLonLatToXy
All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform

public class CoordinateTransformLonLatToXy extends Object implements nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
Transformation from lat-lon to X-Y in meters. Source: https://en.wikipedia.org/wiki/Geographic_coordinate_system.

Copyright (c) 2013-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
  • Constructor Details

    • CoordinateTransformLonLatToXy

      public CoordinateTransformLonLatToXy(double lonCenter, double latCenter)
      Transformation from: https://en.wikipedia.org/wiki/Geographic_coordinate_system.
      Parameters:
      latCenter - the latitude of the center point (0, 0)
      lonCenter - the longitude of the center point (0, 0)
  • Method Details

    • floatTransform

      public final FloatXY floatTransform(double lon, double lat)
      Specified by:
      floatTransform in interface nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
    • floatTransform

      public final FloatXY floatTransform(float lon, float lat)
      Specified by:
      floatTransform in interface nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
    • doubleTransformWgs84ToCartesianXy

      public final DoubleXY doubleTransformWgs84ToCartesianXy(double lon, double lat)
      Convert WGS84 coordinates to Cartesian coordinates.
      Parameters:
      lon - longitude in degrees
      lat - latitude in degrees
      Returns:
      double[]
    • doubleTransform

      public final DoubleXY doubleTransform(double lon, double lat)
      Specified by:
      doubleTransform in interface nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
    • toString

      public final String toString()
      Overrides:
      toString in class Object