Class LonLat
- java.lang.Object
-
- org.openstreetmap.josm.data.projection.proj.LonLat
-
-
Field Summary
Fields Modifier and Type Field Description private doublea
-
Constructor Summary
Constructors Constructor Description LonLat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundsgetAlgorithmBounds()Return the bounds where this projection is applicable.java.lang.StringgetName()Replies a human readable name of this projection.java.lang.StringgetProj4Id()Replies the Proj.4 identifier.voidinitialize(ProjParameters params)Initialize the projection using the provided parameters.double[]invproject(double east, double north)Convert east/north to lat/lon.booleanisGeographic()Return true, if a geographic coordinate reference system is represented.double[]project(double latRad, double lonRad)Convert lat/lon to east/north.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.projection.proj.Proj
lonIsLinearToEast
-
-
-
-
Field Detail
-
a
private double a
-
-
Constructor Detail
-
LonLat
public LonLat()
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:ProjReplies a human readable name of this projection.
-
getProj4Id
public java.lang.String getProj4Id()
Description copied from interface:ProjReplies the Proj.4 identifier.- Specified by:
getProj4Idin interfaceProj- Returns:
- The Proj.4 identifier (as reported by cs2cs -lp).
If no id exists, return
null.
-
initialize
public void initialize(ProjParameters params) throws ProjectionConfigurationException
Description copied from interface:ProjInitialize the projection using the provided parameters.- Specified by:
initializein interfaceProj- Parameters:
params- The projection parameters- Throws:
ProjectionConfigurationException- in case parameters are not suitable
-
project
public double[] project(double latRad, double lonRad)
Description copied from interface:ProjConvert lat/lon to east/north.
-
invproject
public double[] invproject(double east, double north)
Description copied from interface:ProjConvert east/north to lat/lon.- Specified by:
invprojectin interfaceProj- Parameters:
east- east value in meters, divided by the semi major axis of the ellipsoidnorth- north value in meters, divided by the semi major axis of the ellipsoid- Returns:
- array of length 2, containing lat and lon in radians.
-
getAlgorithmBounds
public Bounds getAlgorithmBounds()
Description copied from interface:ProjReturn the bounds where this projection is applicable. This is a fallback for when the projection bounds are not specified explicitly. In this area, the round trip lat/lon → east/north → lat/lon should return the starting value with small error. In addition, regions with extreme distortions should be excluded, if possible. It need not be the absolute maximum, but rather an area that is safe to display in JOSM and contain everything that one would expect to use.- Specified by:
getAlgorithmBoundsin interfaceProj- Returns:
- the bounds where this projection is applicable, null if unknown
-
isGeographic
public boolean isGeographic()
Description copied from interface:ProjReturn true, if a geographic coordinate reference system is represented. I.e. if it returns latitude/longitude values rather than Cartesian east/north coordinates on a flat surface.- Specified by:
isGeographicin interfaceProj- Returns:
- true, if it is geographic
-
-