org.openstreetmap.josm.data.projection.proj
Class Mercator

java.lang.Object
  extended by org.openstreetmap.josm.data.projection.proj.Mercator
All Implemented Interfaces:
Proj

public class Mercator
extends java.lang.Object
implements Proj

Mercator Projection.


Constructor Summary
Mercator()
           
 
Method Summary
 java.lang.String getName()
          A Human readable name of this projection.
 java.lang.String getProj4Id()
          The Proj.4 identifier.
 void initialize(ProjParameters params)
          Initialize the projection using the provided parameters.
 double[] invproject(double east, double north)
          Convert east/north to lat/lon.
 double[] project(double lat_rad, double lon_rad)
          Convert lat/lon to east/north.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mercator

public Mercator()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Proj
A Human readable name of this projection.

Specified by:
getName in interface Proj

getProj4Id

public java.lang.String getProj4Id()
Description copied from interface: Proj
The Proj.4 identifier. (as reported by cs2cs -lp) If no id exists, return null.

Specified by:
getProj4Id in interface Proj

initialize

public void initialize(ProjParameters params)
                throws ProjectionConfigurationException
Description copied from interface: Proj
Initialize the projection using the provided parameters.

Specified by:
initialize in interface Proj
Throws:
ProjectionConfigurationException - in case parameters are not suitable

project

public double[] project(double lat_rad,
                        double lon_rad)
Description copied from interface: Proj
Convert lat/lon to east/north.

Specified by:
project in interface Proj
Parameters:
lat_rad - the latitude in radians
lon_rad - the longitude in radians
Returns:
array of length 2, containing east and north value in meters, divided by the semi major axis of the ellipsoid.

invproject

public double[] invproject(double east,
                           double north)
Description copied from interface: Proj
Convert east/north to lat/lon.

Specified by:
invproject in interface Proj
Parameters:
east - east value in meters, divided by the semi major axis of the ellipsoid
north - north value in meters, divided by the semi major axis of the ellipsoid
Returns:
array of length 2, containing lat and lon in radians.


JOSM