com.c5corp.landUse
Class LandUseMap

java.lang.Object
  extended by com.c5corp.landUse.LandUseMap
All Implemented Interfaces:
java.io.Serializable

public class LandUseMap
extends java.lang.Object
implements java.io.Serializable

This class represents a map of landuse. It implements serialization, but uses the default read and write objects. It is implemented with a 2D array of Coor objects.

Since:
1.0.3
Author:
donated by Caroline McLaughlin
See Also:
Serialized Form

Constructor Summary
LandUseMap(int x, int y)
          Contructor that takes the size of the map as a parameter.
 
Method Summary
 int getCode(int x, int y)
          Accessor method that returns land code based on the location in the LandUseMap
 int getCode(int zone, int easting, int northing)
          Accessor method that returns land code based on the location in UTM coordinates
 int getEasting(int x, int y)
          Accessor method that returns easting based on location in the landUseMap
 int getNEcornerX()
          returns the associated utm coordinate for the corner
 int getNEcornerY()
          returns the associated utm coordinate for the corner
 int getNorthing(int x, int y)
          Accessor method that returns northing based on location in the landUseMap
 int getNWcornerX()
          returns the associated utm coordinate for the corner
 int getNWcornerY()
          returns the associated utm coordinate for the corner
 int getSEcornerX()
          returns the associated utm coordinate for the corner
 int getSEcornerY()
          returns the associated utm coordinate for the corner
 int getSizeX()
          Accessor funtion that returns width of the map in pixels/entries
 int getSizeY()
          Accessor function that returns height of the map in pixels/entries
 int getSWcornerX()
          returns the associated utm coordinate for the corner
 int getSWcornerY()
          returns the associated utm coordinate for the corner
 int getZone(int x, int y)
          Accessor method that returns zone based on location in the landUseMap
 void printCoor(int x, int y)
          print the coordinates at x,y
 void setCorners(int NWn, int NWe, int NEn, int NEe, int SEn, int SEe, int SWn, int SWe)
          Set the corners for this area
 void setmyUtmCoordinatePairLandUse(int y, int x, int z, int n, int e, int l)
          Modifier function that modifies a single Coor in the LandUseMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LandUseMap

public LandUseMap(int x,
                  int y)
Contructor that takes the size of the map as a parameter. It initializes all the Coor objects with the default constructor.

Parameters:
y - height of the map in pixels/entries
x - width of the map in pixels/entries
Method Detail

getCode

public int getCode(int x,
                   int y)
Accessor method that returns land code based on the location in the LandUseMap

Parameters:
x - x location in map
y - y location in map
Returns:
landuse code

getCode

public int getCode(int zone,
                   int easting,
                   int northing)
Accessor method that returns land code based on the location in UTM coordinates

Parameters:
zone - the UTM zone
easting - the UTM easting
northing - the UTM northing
Returns:
the land use code

getZone

public int getZone(int x,
                   int y)
Accessor method that returns zone based on location in the landUseMap

Parameters:
x - x location in map
y - y location in map
Returns:
zone

getNorthing

public int getNorthing(int x,
                       int y)
Accessor method that returns northing based on location in the landUseMap

Parameters:
x - x location in map
y - y location in map
Returns:
northing

getEasting

public int getEasting(int x,
                      int y)
Accessor method that returns easting based on location in the landUseMap

Parameters:
x - x location in map
y - y location in map
Returns:
easting

setmyUtmCoordinatePairLandUse

public void setmyUtmCoordinatePairLandUse(int y,
                                          int x,
                                          int z,
                                          int n,
                                          int e,
                                          int l)
Modifier function that modifies a single Coor in the LandUseMap

Parameters:
y - y location
x - x location
z - zone
n - northing
e - easting
l - landuse code

setCorners

public void setCorners(int NWn,
                       int NWe,
                       int NEn,
                       int NEe,
                       int SEn,
                       int SEe,
                       int SWn,
                       int SWe)
Set the corners for this area

Parameters:
NWn - utm coordinate
NWe - utm coordinate
NEn - utm coordinate
NEe - utm coordinate
SEn - utm coordinate
SEe - utm coordinate
SWn - utm coordinate
SWe - utm coordinate

getNEcornerX

public int getNEcornerX()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getNEcornerY

public int getNEcornerY()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getNWcornerX

public int getNWcornerX()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getNWcornerY

public int getNWcornerY()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getSWcornerX

public int getSWcornerX()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getSWcornerY

public int getSWcornerY()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getSEcornerX

public int getSEcornerX()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getSEcornerY

public int getSEcornerY()
returns the associated utm coordinate for the corner

Returns:
utm coordinate

getSizeY

public int getSizeY()
Accessor function that returns height of the map in pixels/entries

Returns:
height of the LandUseMap

getSizeX

public int getSizeX()
Accessor funtion that returns width of the map in pixels/entries

Returns:
width of the LandUseMap

printCoor

public void printCoor(int x,
                      int y)
print the coordinates at x,y

Parameters:
x - x coord
y - y coord