org.openstreetmap.josm.tools
Class OsmUrlToBounds
java.lang.Object
org.openstreetmap.josm.tools.OsmUrlToBounds
public class OsmUrlToBounds
- extends java.lang.Object
Method Summary |
static LatLon |
getLatLonOfTile(double x,
double y,
double zoom)
|
static Pair<java.lang.Double,java.lang.Double> |
getTileOfLatLon(double lat,
double lon,
double zoom)
|
static java.lang.String |
getURL(Bounds b)
|
static java.lang.String |
getURL(LatLon pos,
int zoom)
|
static int |
getZoom(Bounds b)
|
static double |
invMercatorY(double north)
|
static double |
mercatorY(double lat)
|
static Bounds |
parse(java.lang.String url)
|
private static double |
parseDouble(java.util.HashMap<java.lang.String,java.lang.String> map,
java.lang.String key)
|
private static Bounds |
parseShortLink(java.lang.String url)
p |
static Bounds |
positionToBounds(double lat,
double lon,
int zoom)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SHORTLINK_PREFIX
private static final java.lang.String SHORTLINK_PREFIX
- See Also:
- Constant Field Values
SHORTLINK_CHARS
private static final char[] SHORTLINK_CHARS
R
public static final double R
- See Also:
- Constant Field Values
OsmUrlToBounds
public OsmUrlToBounds()
parse
public static Bounds parse(java.lang.String url)
parseDouble
private static double parseDouble(java.util.HashMap<java.lang.String,java.lang.String> map,
java.lang.String key)
parseShortLink
private static Bounds parseShortLink(java.lang.String url)
- p
- Parameters:
url
- string for parsing
- Returns:
- Bounds if shortlink, null otherwise
- See Also:
http://trac.openstreetmap.org/browser/sites/rails_port/lib/short_link.rb
positionToBounds
public static Bounds positionToBounds(double lat,
double lon,
int zoom)
mercatorY
public static double mercatorY(double lat)
invMercatorY
public static double invMercatorY(double north)
getTileOfLatLon
public static Pair<java.lang.Double,java.lang.Double> getTileOfLatLon(double lat,
double lon,
double zoom)
getLatLonOfTile
public static LatLon getLatLonOfTile(double x,
double y,
double zoom)
getZoom
public static int getZoom(Bounds b)
getURL
public static java.lang.String getURL(Bounds b)
getURL
public static java.lang.String getURL(LatLon pos,
int zoom)
JOSM