com.AndrewGray.geoutils
Class MercatorMap

java.lang.Object
  |
  +--com.AndrewGray.geoutils.MercatorMap

public final class MercatorMap
extends java.lang.Object

class defines a notional perfect mercator map with specified width and height. Used in conjunction with MapPoint to allow the conversion between mercator x,y coordinates and LatLongs.
The map supports re-sizing after it it created. Upon any resize operation all currently defined mappoints are recomputed based on their LatLong.

Disclaimer & Warranty
The software is supplied as-is. No warranty, or statement of fitness of purpose is given.

All emphasis is on the user to verify values. In particular, this software should not be used for safety critical applications such as navigation, aeronautics, etc.

In obtaining this software you agree that liability of the copyright holder for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the software be limited to the purchase cost thereof. This includes but is not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the software to operate with any other software, even if such holder or other party has been advised of the possibility of such damages.

Copyright © 2004 by Andrew Gray

Author:
Andrew Gray
See Also:
MapPoint

Constructor Summary
MercatorMap(int w, int h)
          Create a new MercatorMap of the specified width and height.
 
Method Summary
 void addMapPoint(MapPoint mp)
          Add a new MapPoint to this map
 int getHeight()
          Get current height of this map
 java.util.Vector getMapPoints()
          Get the list of MapPoint current defined in this map
 int getOx()
          get the X origin of this map
 int getOy()
          get the Y origin of this map
 int getWidth()
          Get current width of this map
 void setHeight(int h)
          set the height of this map
 void setOx(int x)
          set the X origin of this map
 void setOy(int y)
          set Y origin of this map
 void setWidth(int w)
          set the width of this map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MercatorMap

public MercatorMap(int w,
                   int h)
Create a new MercatorMap of the specified width and height.
Parameters:
w - the width of the map
h - the height of the map
Method Detail

addMapPoint

public void addMapPoint(MapPoint mp)
Add a new MapPoint to this map
Parameters:
mp - the new MapPoint to add

getMapPoints

public java.util.Vector getMapPoints()
Get the list of MapPoint current defined in this map
Returns:
a Vector containing the current list of defined map points

setWidth

public final void setWidth(int w)
set the width of this map
Parameters:
w - the new width

setHeight

public final void setHeight(int h)
set the height of this map
Parameters:
h - the new height

getWidth

public final int getWidth()
Get current width of this map
Returns:
the current width of this map

getHeight

public final int getHeight()
Get current height of this map
Returns:
the current height of this map

setOx

public final void setOx(int x)
set the X origin of this map
Parameters:
y - the new Y origin

setOy

public final void setOy(int y)
set Y origin of this map
Parameters:
y - the new Y origin

getOx

public final int getOx()
get the X origin of this map
Returns:
the current X origin of this map

getOy

public final int getOy()
get the Y origin of this map
Returns:
the current Y origin of this map