com.nutiteq.maps.projections
Class EPSG4326

java.lang.Object
  extended by com.nutiteq.maps.BaseMap
      extended by com.nutiteq.maps.projections.EPSG4326
All Implemented Interfaces:
GeoMap, Projection
Direct Known Subclasses:
BaseKaMap, SimpleWMSMap

public abstract class EPSG4326
extends BaseMap
implements Projection

Abstract class for doing WGS84 coordinates calculations to map pixels in EPSG4326 (Plate-carree (flat) projection, to be used with WMS) and back.


Constructor Summary
EPSG4326(Copyright copyright, int tileSize, int minZoom, int maxZoom)
           
EPSG4326(java.lang.String copyright, int tileSize, int minZoom, int maxZoom)
           
 
Method Summary
 double getRatio()
           
 Point mapPosToWgs(MapPos pos)
          Convert a point on pixel map to WGS84 coordinates (decimal coordinates * 1000000)
 void setWidthHeightRatio(double ratio)
          Set ratio between width and height.
 MapPos wgsToMapPos(Point wgs, int zoom)
          Convert WGS84 coordinates to pixel point on map
 
Methods inherited from class com.nutiteq.maps.BaseMap
addTileOverlay, getCopyright, getMapHeight, getMapWidth, getMaxZoom, getMinZoom, getMissingTileImage, getZoomRange, getTileMapBounds, getTileOverlay, getTileSize, setCopyright, setMissingTileImage, zoom
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EPSG4326

public EPSG4326(Copyright copyright,
                int tileSize,
                int minZoom,
                int maxZoom)

EPSG4326

public EPSG4326(java.lang.String copyright,
                int tileSize,
                int minZoom,
                int maxZoom)
Method Detail

mapPosToWgs

public Point mapPosToWgs(MapPos pos)
Description copied from interface: Projection
Convert a point on pixel map to WGS84 coordinates (decimal coordinates * 1000000)

Specified by:
mapPosToWgs in interface GeoMap
Specified by:
mapPosToWgs in interface Projection
Parameters:
pos - pixel point on the map (on 256x256 pixels map of the world 0E 0N is located at map pixel 128x : 128y)
Returns:
point in internally used WGS84 format (decimal degrees * 1000000)

wgsToMapPos

public MapPos wgsToMapPos(Point wgs,
                          int zoom)
Description copied from interface: Projection
Convert WGS84 coordinates to pixel point on map

Specified by:
wgsToMapPos in interface GeoMap
Specified by:
wgsToMapPos in interface Projection
Parameters:
wgs - WGS84 coordinates (decimal coordinates * 1000000)
zoom - zoom level for the map
Returns:
pixel position on map for the coordinates

setWidthHeightRatio

public void setWidthHeightRatio(double ratio)
Set ratio between width and height. Use 1 for a "square world map" or 2 for a stretched map. Only values >= 1 are accepted

Parameters:
ratio - width/height ratio

getRatio

public double getRatio()