org.ascape.gis.model
Class MapCoordinate

java.lang.Object
  extended by org.ascape.model.space.Coordinate
      extended by org.ascape.model.space.CoordinateContinuous
          extended by org.ascape.model.space.Coordinate1DContinuous
              extended by org.ascape.model.space.Coordinate2DContinuous
                  extended by org.ascape.gis.model.MapCoordinate
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MapCoordinate
extends Coordinate2DContinuous

A location on a map

Author:
Miles Parker, Josh Miller, and others
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.ascape.model.space.CoordinateContinuous
values
 
Constructor Summary
MapCoordinate()
          Constructs an instance of MapCoordinate.
MapCoordinate(double lat, double lon)
          Constructs an instance of MapCoordinate.
MapCoordinate(MapCoordinate coordinate)
          Constructs an instance of MapCoordinate.
 
Method Summary
 boolean equals(MapCoordinate other)
          Returns true if two MapCoordinates are equal
 double getLatitude()
          Gets the latitude for the MapCoordinate object.
 double getLongitude()
          Gets the longitude for the MapCoordinate object.
 void setLatitude(double lat)
          Sets latitude for the MapCoordinate object.
 void setLatLong(double lat, double lon)
          Sets latLong for the MapCoordinate object.
 void setLongitude(double lon)
          Sets longitude for the MapCoordinate object.
 java.lang.String toString()
          Return a String of the Latitude and Longitude of the MapCoordinate
 
Methods inherited from class org.ascape.model.space.Coordinate2DContinuous
add, getDistance, getYValue, setYValue
 
Methods inherited from class org.ascape.model.space.Coordinate1DContinuous
getValue, getXValue, setValue, setXValue
 
Methods inherited from class org.ascape.model.space.CoordinateContinuous
equals, getDimensionCount, getProduct, getValueAtDimension, getValues, setValueAtDimension, setValues
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapCoordinate

public MapCoordinate()
Constructs an instance of MapCoordinate.


MapCoordinate

public MapCoordinate(double lat,
                     double lon)
Constructs an instance of MapCoordinate. Warning: this contructor expects to have coordiantes supplied in latitude, longitude order. This is the opposite of the typical x, y ordering, that is, the vertical (y) value is specified first, in keeping with cartological practice.

Parameters:
lat - parameter
lon - parameter

MapCoordinate

public MapCoordinate(MapCoordinate coordinate)
Constructs an instance of MapCoordinate.

Parameters:
coordinate - parameter
Method Detail

equals

public boolean equals(MapCoordinate other)
Returns true if two MapCoordinates are equal

Parameters:
other - The other MapCoordinate
Returns:
True if the two are equal

toString

public java.lang.String toString()
Return a String of the Latitude and Longitude of the MapCoordinate

Overrides:
toString in class Coordinate2DContinuous
Returns:
a String

getLatitude

public double getLatitude()
Gets the latitude for the MapCoordinate object.

Returns:
the latitude

getLongitude

public double getLongitude()
Gets the longitude for the MapCoordinate object.

Returns:
the longitude

setLatLong

public void setLatLong(double lat,
                       double lon)
Sets latLong for the MapCoordinate object.

Parameters:
lat - the latLong
lon - the latLong

setLatitude

public void setLatitude(double lat)
Sets latitude for the MapCoordinate object.

Parameters:
lat - the latitude

setLongitude

public void setLongitude(double lon)
Sets longitude for the MapCoordinate object.

Parameters:
lon - the longitude


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.