Package org.jxmapviewer.viewer.util
Class MercatorUtils
java.lang.Object
org.jxmapviewer.viewer.util.MercatorUtils
public final class MercatorUtils
extends java.lang.Object
A utility class of methods that help when
dealing with standard Mercator projections.
-
Method Details
-
longToX
public static int longToX(double longitudeDegrees, double radius)- Parameters:
longitudeDegrees- the longitude in degreesradius- the world radius in pixels- Returns:
- the x value
-
latToY
public static int latToY(double latitudeDegrees, double radius)- Parameters:
latitudeDegrees- the latitude in degreesradius- the world radius in pixels- Returns:
- the y value
-
xToLong
public static double xToLong(int x, double radius)- Parameters:
x- the x valueradius- the world radius in pixels- Returns:
- the longitude in degrees
-
yToLat
public static double yToLat(int y, double radius)- Parameters:
y- the y valueradius- the world radius in pixels- Returns:
- the latitude in degrees
-