net.agmodel.demdata
Class GridLayerImpl

java.lang.Object
  |
  +--net.agmodel.demdata.GridLayerImpl
All Implemented Interfaces:
GridLayer, Serializable, ServerResult
Direct Known Subclasses:
GridFloatImpl, GridShortImpl

public abstract class GridLayerImpl
extends Object
implements GridLayer, ServerResult

See Also:
Serialized Form

Field Summary
protected  double latitudeRes
           
protected  double longitudeRes
           
protected  GeographicalBox region
           
 
Constructor Summary
GridLayerImpl(GeographicalBox region, double latRes, double longRes, DEMSourceDetail sourceDetail)
           
 
Method Summary
 double get(Location2D location)
           
 GeographicalBox getBounds()
           
 double getEast()
           
 double getLatitude(int yIndex)
           
 double getLatitudeRes()
           
 double getLatitudeSpread()
           
 double getLongitude(int xIndex)
           
 double getLongitudeRes()
           
 double getLongitudeSpread()
           
 Location2D getNearestPointTo(Location2D location, boolean northWest)
          Returns the nearest measurement point to the specified location in a northWest or southEast direction
 double getNorth()
           
 Location2D getNorthWest()
           
 int getnX()
           
 int getnY()
           
 DEMSourceDetail getSourceDetail()
           
 double getSouth()
           
 Location2D getSouthEast()
           
 double getWest()
           
 int getXIndex(double longitude)
           
 int getYIndex(double latitude)
           
abstract  boolean isLand(double latitude, double longitude)
           
 void setSourceDetail(DEMSourceDetail detail)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.agmodel.demdata.GridLayer
get
 

Field Detail

region

protected GeographicalBox region

latitudeRes

protected double latitudeRes

longitudeRes

protected double longitudeRes
Constructor Detail

GridLayerImpl

public GridLayerImpl(GeographicalBox region,
                     double latRes,
                     double longRes,
                     DEMSourceDetail sourceDetail)
Method Detail

getXIndex

public int getXIndex(double longitude)
Specified by:
getXIndex in interface GridLayer

getYIndex

public int getYIndex(double latitude)
Specified by:
getYIndex in interface GridLayer

getLatitude

public double getLatitude(int yIndex)
Specified by:
getLatitude in interface GridLayer

getLongitude

public double getLongitude(int xIndex)
Specified by:
getLongitude in interface GridLayer

getNearestPointTo

public Location2D getNearestPointTo(Location2D location,
                                    boolean northWest)
Description copied from interface: GridLayer
Returns the nearest measurement point to the specified location in a northWest or southEast direction

Specified by:
getNearestPointTo in interface GridLayer
Parameters:
location - the point of interest.
northWest - whether the point northWest or southEast is wanted.
Returns:
the location of the nearest measurement point

get

public double get(Location2D location)
Specified by:
get in interface GridLayer

isLand

public abstract boolean isLand(double latitude,
                               double longitude)
Specified by:
isLand in interface GridLayer

getBounds

public GeographicalBox getBounds()
Specified by:
getBounds in interface GridLayer

getNorthWest

public Location2D getNorthWest()
Specified by:
getNorthWest in interface GridLayer

getSouthEast

public Location2D getSouthEast()
Specified by:
getSouthEast in interface GridLayer

getNorth

public double getNorth()
Specified by:
getNorth in interface GridLayer

getSouth

public double getSouth()
Specified by:
getSouth in interface GridLayer

getEast

public double getEast()
Specified by:
getEast in interface GridLayer

getWest

public double getWest()
Specified by:
getWest in interface GridLayer

getLatitudeSpread

public double getLatitudeSpread()
Specified by:
getLatitudeSpread in interface GridLayer

getLongitudeSpread

public double getLongitudeSpread()
Specified by:
getLongitudeSpread in interface GridLayer

getLatitudeRes

public double getLatitudeRes()
Specified by:
getLatitudeRes in interface GridLayer

getLongitudeRes

public double getLongitudeRes()
Specified by:
getLongitudeRes in interface GridLayer

getnX

public int getnX()

getnY

public int getnY()

getSourceDetail

public DEMSourceDetail getSourceDetail()
Specified by:
getSourceDetail in interface GridLayer

setSourceDetail

public void setSourceDetail(DEMSourceDetail detail)