Package org.opentrafficsim.animation.gis
Class CoordinateTransformLonLatToXy
java.lang.Object
org.opentrafficsim.animation.gis.CoordinateTransformLonLatToXy
- All Implemented Interfaces:
Serializable
,nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
public class CoordinateTransformLonLatToXy
extends Object
implements nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform, Serializable
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
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
nl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform.NoTransform
-
Constructor Summary
ConstructorDescriptionCoordinateTransformLonLatToXy
(double lonCenter, double latCenter) Transformation from: https://en.wikipedia.org/wiki/Geographic_coordinate_system. -
Method Summary
Modifier and TypeMethodDescriptionfinal double[]
doubleTransform
(double lon, double lat) final double[]
doubleTransformWgs84ToCartesianXy
(double lon, double lat) Convert WGS84 coordinates to Cartesian coordinates.final float[]
floatTransform
(double lon, double lat) final String
toString()
-
Constructor Details
-
CoordinateTransformLonLatToXy
public CoordinateTransformLonLatToXy(double lonCenter, double latCenter) Transformation from: https://en.wikipedia.org/wiki/Geographic_coordinate_system.- Parameters:
latCenter
- double; the latitude of the center point (0, 0)lonCenter
- double; the longitude of the center point (0, 0)
-
-
Method Details
-
floatTransform
public final float[] floatTransform(double lon, double lat) - Specified by:
floatTransform
in interfacenl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
-
doubleTransformWgs84ToCartesianXy
public final double[] doubleTransformWgs84ToCartesianXy(double lon, double lat) Convert WGS84 coordinates to Cartesian coordinates.- Parameters:
lon
- double; longitude in degreeslat
- double; latitude in degrees- Returns:
- double[]
-
doubleTransform
public final double[] doubleTransform(double lon, double lat) - Specified by:
doubleTransform
in interfacenl.tudelft.simulation.dsol.animation.gis.transform.CoordinateTransform
-
toString
-