net.agmodel.demdata
Class GridShortImpl

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

public class GridShortImpl
extends GridLayerImpl

See Also:
Serialized Form

Field Summary
static short SEA
           
 
Fields inherited from class net.agmodel.demdata.GridLayerImpl
latitudeRes, longitudeRes, region
 
Constructor Summary
GridShortImpl(GeographicalBox region, double latRes, double longRes, DEMSourceDetail sourceDetails)
           
 
Method Summary
 double get(double latitude, double longitude)
           
 boolean isLand(double latitude, double longitude)
           
 void markAsSea(int xIndex, int yIndex)
           
 void markAsSea(Location l)
           
 void putData(int xIndex, int yIndex, short input)
           
 void putData(int xIndex, int yIndex, short[] input)
           
 GridShortImpl sample(double newLatRes, double newLongRes)
          Sample the grid at a lower resolution
 String toString()
           
 
Methods inherited from class net.agmodel.demdata.GridLayerImpl
get, getBounds, getEast, getLatitude, getLatitudeRes, getLatitudeSpread, getLongitude, getLongitudeRes, getLongitudeSpread, getNearestPointTo, getNorth, getNorthWest, getnX, getnY, getSourceDetail, getSouth, getSouthEast, getWest, getXIndex, getYIndex, setSourceDetail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEA

public static final short SEA
See Also:
Constant Field Values
Constructor Detail

GridShortImpl

public GridShortImpl(GeographicalBox region,
                     double latRes,
                     double longRes,
                     DEMSourceDetail sourceDetails)
Method Detail

putData

public void putData(int xIndex,
                    int yIndex,
                    short[] input)

putData

public void putData(int xIndex,
                    int yIndex,
                    short input)

markAsSea

public void markAsSea(Location l)

markAsSea

public void markAsSea(int xIndex,
                      int yIndex)

isLand

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

get

public double get(double latitude,
                  double longitude)

toString

public String toString()
Overrides:
toString in class Object

sample

public GridShortImpl sample(double newLatRes,
                            double newLongRes)
Sample the grid at a lower resolution

Parameters:
newLatRes - the new latitude resolution, in samples per degree of latitude
newLongRes - the new longitude resolution, in samples per degree of longitude