|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.c5corp.c5utm.DemMetadata
public class DemMetadata
public class dbHelper
DemMetadata.java - part of Landscape database (otherwise known as the C5UTM database).
The UtmMetaData
class is just a structure to hold the
fields in a UTM_METADATA record. It provides a constructor to initialize the fields
and accessor methods for all fields. Usually you will not create and instance
of this class yourself, but will use the static methods in the C5UTMdatabaseMethods
class to create a UtmMetaData from a query of some sort.
Field Summary | |
---|---|
static int[] |
CARDINAL_BITS
CARDINAL_BITS, which also include intercardinal primary directions, are arranged declared in the array in the following order: {N_BIT,NE_BIT,E_BIT,SE_BIT,S_BIT,SW_BIT,W_BIT,NW_BIT}. |
static int |
E_BIT
Mask to check for E bit (see CARDINAL_BITS[] below) |
static int |
N_BIT
Mask to check for N bit (see CARDINAL_BITS[] below) |
static int |
NE_BIT
Mask to check for NE bit (see CARDINAL_BITS[] below) |
static int |
NW_BIT
Mask to check for NW bit (see CARDINAL_BITS[] below) |
static int |
S_BIT
Mask to check for S bit (see CARDINAL_BITS[] below) |
static int |
SE_BIT
Mask to check for SE bit (see CARDINAL_BITS[] below) |
static int |
SW_BIT
Mask to check for SW bit (see CARDINAL_BITS[] below) |
static int |
W_BIT
Mask to check for W bit (see CARDINAL_BITS[] below) |
Constructor Summary | |
---|---|
DemMetadata(java.lang.String dem_id,
int zone,
int columns_x,
int max_profile_length_y,
double sw_easting,
double sw_northing,
double nw_easting,
double nw_northing,
double ne_easting,
double ne_northing,
double se_easting,
double se_northing,
java.sql.Date date_added,
java.lang.String local_dem_file,
java.lang.String file_info,
int oneKgrid,
int point_stats,
double average_elevation)
Constructs a DemMetadata object, which is normally constructed from data in the database, utilizing static methods as in the C5UTM class. |
Method Summary | |
---|---|
int |
calculateSurroundingDemAvailability(java.sql.Connection connection)
Returns an integer containing flags describing the surrounding dem availability. |
int |
get1kGridStatus()
This attribute indicates the status of statistical metadata that has been generated for the areas in this dem, and stored in the tables UTM_1K_GRID_DATA and UTM_POINT_STATS, See the sql for those tables. |
DemMetadata |
getAdjacentDemMetadata(int cardinal_direction,
java.sql.Connection connection)
Returns the DemMetadata object for the defined cardinal direction. |
double |
getAverageElevation()
gets the Average Elevation for the entire dem |
int |
getColumns_x()
The number of profiles in the original DEM - think x (the max val of x in UTM coords) |
java.sql.Date |
getDateAdded()
date_added is not part of the dem specification it holds the date that the DEM was placed in this database. |
java.lang.String |
getDemId()
database primary key |
DemMetadata |
getEastDem()
gets the DemMetadata object east of this one. |
java.lang.String |
getFileInfo()
The original file information from the origin DEM, TYPE A record number 1 |
java.lang.String |
getLocalDemFile()
The local DEM file name. |
int |
getMaxProfileLength_y()
max_profile_length is not part of the dem specification, but is important in terms imaging an entire dem. |
double |
getNEeasting()
Describes the corners of the area the DEM describes |
double |
getNEnorthing()
Describes the corners of the area the DEM describes |
DemMetadata |
getNorthDem()
gets the DemMetadata object north of this one. |
DemMetadata |
getNortheastDem()
gets the DemMetadata object northeast of this one. |
DemMetadata |
getNorthwestDem()
gets the DemMetadata object northwest of this one. |
double |
getNWeasting()
Describes the corners of the area the DEM describes |
double |
getNWnorthing()
Describes the corners of the area the DEM describes |
int |
getPointStatStatus()
This attribute indicates the status of statistical metadata that has been generated for the areas in this dem, and stored in the tables UTM_1K_GRID_DATA and UTM_POINT_STATS, See the sql for those tables. |
double |
getSEeasting()
Describes the corners of the area the DEM describes |
double |
getSEnorthing()
Describes the corners of the area the DEM describes |
DemMetadata |
getSouthDem()
gets the DemMetadata object south of this one. |
DemMetadata |
getSoutheastDem()
gets the DemMetadata object southeast of this one. |
DemMetadata |
getSouthwestDem()
gets the DemMetadata object southwest of this one. |
boolean |
getSurroundingDemsCalculated()
returns boolean that indicates whether or not the surround DemMetadata object references have been calculated |
double |
getSWeasting()
Describes the corners of the area the DEM describes |
double |
getSWnorthing()
Describes the corners of the area the DEM describes |
DemMetadata |
getWestDem()
gets the DemMetadata object west of this one. |
int |
getX()
returns grid X location, only meaningful after grid location has been calculated by the Grid constructor. |
int |
getY()
returns grid Y location, only meaningful after grid location has been calculated by the Grid constructor. |
int |
getZone()
The UTM zone |
protected void |
setEastDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the east of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
protected void |
setGridLoc(int x,
int y)
modifier function for Grid object to use. |
protected void |
setNorthDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the north of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
protected void |
setNortheastDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the northeast of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
protected void |
setNorthwestDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the northwest of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
protected void |
setSouthDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the south of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
protected void |
setSoutheastDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the southeast of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
protected void |
setSouthwestDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the southwest of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
protected void |
setSurroundingDemsCalculated(boolean x)
sets boolean that indicates that the references to surrounding DemMetadata objects have been made |
protected void |
setWestDem(java.util.Vector<DemMetadata> listDems)
sets the reference to the Dem to the west of this Dem given a Vector of DemMetadata objects to be put in the Grid object |
void |
setX(int x)
modifier function for Grid object to use. |
void |
setY(int y)
modifier function for Grid object to use. |
java.lang.String |
toString()
Returns a String representation of the object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NW_BIT
public static final int W_BIT
public static final int SW_BIT
public static final int S_BIT
public static final int SE_BIT
public static final int E_BIT
public static final int NE_BIT
public static final int N_BIT
public static final int[] CARDINAL_BITS
int getSurroundingDemAvailability()
.
Constructor Detail |
---|
public DemMetadata(java.lang.String dem_id, int zone, int columns_x, int max_profile_length_y, double sw_easting, double sw_northing, double nw_easting, double nw_northing, double ne_easting, double ne_northing, double se_easting, double se_northing, java.sql.Date date_added, java.lang.String local_dem_file, java.lang.String file_info, int oneKgrid, int point_stats, double average_elevation)
dem_id
- the database id of the DEMzone
- the UTM zonecolumns_x
- number of coulmnsmax_profile_length_y
- max profile length (size)sw_easting
- the SW eastingsw_northing
- the SW northingnw_easting
- the NW eastingnw_northing
- the NW northingne_easting
- the NE eastingne_northing
- the NE northingse_easting
- the SE eastingse_northing
- the SE northingdate_added
- date added to dblocal_dem_file
- local DEM file namefile_info
- DEM file infooneKgrid
- describes UTM_1K_GRID_DATA table statuspoint_stats
- describes UTM_POINT_STATS table status (see /sql)average_elevation
- average elevation of DEM (see /sql)Method Detail |
---|
public int calculateSurroundingDemAvailability(java.sql.Connection connection)
Returns an integer containing flags describing the surrounding dem availability. If the bit is true, the dem in the represented direction is available in the database. See the public final static int values declared in this class. Note that the class calculates its result only when first called. The answer is cached, and can not be recalculated without getting a new DemMetadata object. Note that this method does not look in adjacent UTM zones.
connection
- database connection
Connection
,
CARDINAL_BITS
public DemMetadata getAdjacentDemMetadata(int cardinal_direction, java.sql.Connection connection)
Returns the DemMetadata object for the defined cardinal direction. See the public final static int values declared in this class for appropriate aguments. Returns 'this' object if one of the static int values defined in this class is not used as an argument, and null if the area does not exist. public int calculateSurroundingDemAvailability(Connection connection) checks for the existence of the surrounding areas. Note that this method does not look in adjacent UTM zones yet.
cardinal_direction
- descriptor of the direction from which to retrive adjacent DemMetadataconnection
- the datbase connection
protected void setNorthDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadataprotected void setNortheastDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadataprotected void setEastDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadataprotected void setSoutheastDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadataprotected void setSouthDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadataprotected void setSouthwestDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadataprotected void setWestDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadataprotected void setNorthwestDem(java.util.Vector<DemMetadata> listDems)
listDems
- the Vector of DemMetadatapublic DemMetadata getNorthDem()
calculateSurroundingDemAvailability(Connection connection)
public DemMetadata getNortheastDem()
calculateSurroundingDemAvailability(Connection connection)
public DemMetadata getEastDem()
calculateSurroundingDemAvailability(Connection connection)
public DemMetadata getSoutheastDem()
calculateSurroundingDemAvailability(Connection connection)
public DemMetadata getSouthDem()
calculateSurroundingDemAvailability(Connection connection)
public DemMetadata getSouthwestDem()
calculateSurroundingDemAvailability(Connection connection)
public DemMetadata getWestDem()
calculateSurroundingDemAvailability(Connection connection)
public DemMetadata getNorthwestDem()
calculateSurroundingDemAvailability(Connection connection)
public java.lang.String getDemId()
public int getZone()
public int getColumns_x()
public int getMaxProfileLength_y()
public double getSWeasting()
public double getSWnorthing()
public double getNWeasting()
public double getNWnorthing()
public double getNEeasting()
public double getNEnorthing()
public double getSEeasting()
public double getSEnorthing()
public java.sql.Date getDateAdded()
public java.lang.String getLocalDemFile()
public java.lang.String getFileInfo()
public int get1kGridStatus()
This attribute indicates the status of statistical metadata that has been generated for the areas in this dem, and stored in the tables UTM_1K_GRID_DATA and UTM_POINT_STATS, See the sql for those tables. 0 indicates that the area needs full processing. 1 indicates that the area was processed, but there were void areas near the edges (probably because points from adjoining dems were not present in the database.) 2 indicates that every point has been processed.
The UTM_1K_GRID_DATA table simply references data records in the UTM_POINT_STATS table. This allows access to data representing a 1 kilometer grid overlaying the landscape at even multiples of 1000 meters in the grid system. Note that this is the same as the UTM grid overlaid on typical USGS maps.
Build1KGridStats
public int getPointStatStatus()
This attribute indicates the status of statistical metadata that has been generated for the areas in this dem, and stored in the tables UTM_1K_GRID_DATA and UTM_POINT_STATS, See the sql for those tables. 0 indicates that the area needs full processing. 1 indicates that the area was processed, but there were void areas near the edges (probably because points from adjoining dems were not present in the database.) 2 indicates that every point has been processed.
The UTM_POINT_STATS records represent statistics about the 1K square surrounding each point in the database. This data can take an incredible amount of time to calculate
public double getAverageElevation()
protected void setSurroundingDemsCalculated(boolean x)
x
- flagpublic boolean getSurroundingDemsCalculated()
public int getX()
public int getY()
protected void setGridLoc(int x, int y)
x
- grid x locationy
- grid y locationpublic void setX(int x)
x
- grid x locationpublic void setY(int y)
y
- grid y locationpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |