Class CoordinateTransformLonLatToXY

  • All Implemented Interfaces:
    java.io.Serializable, CoordinateTransform

    public class CoordinateTransformLonLatToXY
    extends java.lang.Object
    implements CoordinateTransform, java.io.Serializable
    Transformation from lat-lon to X-Y in meters. Source: https://en.wikipedia.org/wiki/Geographic_coordinate_system.

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

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 30, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Constructor Detail

      • 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 Detail

      • doubleTransformWSG84toCartesianXY

        public final double[] doubleTransformWSG84toCartesianXY​(double lon,
                                                                double lat)
        Convert WGS84 coordinates to Cartesian coordinates.
        Parameters:
        lon - double; longitude in degrees
        lat - double; latitude in degrees
        Returns:
        double[]
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object