|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.c5corp.c5dem.Dem
public class Dem
Digital Elevation Model (DEM) object
Dem encapsulates objects for each data type in a DEM file: type a, type b, type c. Type a and c are single records, and are held in variables in a TypeA and TypeC object. TypeB records (elevation profiles) are contained in a TypeBprofiles object as an array. There are N profiles per Dem file.
I have rewritten the interface a great deal and at different times. a stylistic convention I have emerged is to use shell_style method names for native DEM data elements, and humpNotation for generated metadata and other things not specified by the DEM format. I have not extended these to TypeA or TypeC.
Constructor Summary | |
---|---|
Dem(java.io.File file)
Constructs a DEM from an input file specified in java.io.File file |
|
Dem(java.lang.String inputfile)
Constructs a DEM from an input file specified in String inputfile |
|
Dem(java.net.URL url)
Constructs a DEM from a java.net.URL |
Method Summary | |
---|---|
short |
get_accuracy_code()
Returns the dem specification Data Element 14 - Accuracy code for elevations: 0=unknown accuracy, 1=accuracy information is given in logical record type C. |
short |
get_availability()
Type C Data Element 4 - Code indicating availability of statistics in data element 5: 1=available, 0=unavailable |
short |
get_column_count()
Convenience method for Data Element 16 the number of columns in the file is the same as the number of B records |
short |
get_contour_interval_l()
Returns the dem specification Data Element 18 - Source contour interval units. |
short |
get_contour_interval_s()
Returns the dem specification Data Element 20 - Source contour interval units Corresponds to the units of the map smallest primary contour interval. |
double |
get_counter_angle()
Returns the dem specification Data Element 13 - Counterclockwise angle (in radians) from the primary axis of ground planimetric reference to the primary axis of the DEM local reference system. |
short |
get_data_edition()
Returns the dem specification Data Element 28 - Data Edition: 01-99 Primarily a NIMA specific field. |
short |
get_data_rmse_sample_size()
Type C Data Element 6 - Sample size on which statistics in element 5 are based, if 0, then accuracy will be assumed to be estimated rather than computed. |
short |
get_data_rmse()
Type C Data Element 5 - RMSE of DEM data relative to file's datum (x, y, z) In same units as indicated by elements 8 and 9 of logical record type A. |
short |
get_dem_level_code()
Returns the dem specification Data Element 3 - DEM level code: 1=DEM-1, 2=DEM-2, 3=DEM-3 |
short |
get_elevation_pattern()
Returns the dem specification Data Element 4 - Code defining elevation pattern (regular or random): 1=regular, 2=random is reserved for future use. |
short |
get_elevation_unit()
Returns the dem specification Data Element 9 - Code defining unit of measure for elevation coordinates throughout the file: 1=feet, 2=meters. |
java.lang.String |
get_file_name()
Returns the dem spefication Data Element 1 - the file name. |
short |
get_file_rmse_sample_size()
Type C Data Element 3 - Sample size on which statistics in data element 2 are based If 0, then accuracy will be assumed to be estimated rather than computed. |
short |
get_file_rmse()
Type C Data Element 2 - RMSE of file's datum relative to absolute datum (x, y, z) In same units as indicated by elements 8 and 9 of logical record type A. |
double[][] |
get_ground_coordinates()
Returns the dem specification Data Element 11 (a 4x2 array) - A 4,2 array containing the ground coordinates of the four corners for the DEM. |
short |
get_horizontal_datum()
Returns the dem specification Data Element 27 - Horizontal datum: 1=North American Datum 1927 (NAD 27) 2=World Geodetic System 1972 (WGS 72) 3=WGS 84 4=NAD 83 5=Old Hawaii Datum 6=Puerto Rico Datum 7=NAD 83 Provisional (shifts in horizontal coordinates are computed, but old DEM nodes are not resampled) |
char |
get_inspection_flag()
Returns the dem specification Data Element 23 - Inspection revision flag, "I" or "R" |
short |
get_largest_interval()
Returns the dem specification Data Element 17 - Largest primary contour interval. |
double |
get_max_elevation()
Convienence method for Data Element 12 (which is a 2 element array), returing the maximum elevation in a dem file. |
java.lang.String |
get_mc_origin()
Returns the dem specification Data Element 2 - MC origin code, Mapping Center origin Code. |
double[] |
get_min_and_max_values()
Returns the dem specification Data Element 12 (a 2 element array) - A two-element array containing minimum and maximum elevations for the DEM. |
double |
get_min_elevation()
Convienence method for Data Element 12 (which is a 2 element array), returing the minimum elevation in a dem file. |
short |
get_percent_void()
Returns the dem specification Data Element 29 - Percent Void: If element 25 indicates a void, this field (right justified) contains the percentage of nodes in the file set to void (-32,767). |
short |
get_planimetric_system()
Returns the dem specification Data Element 5 - Code defining ground planimetric reference system: 0=Geographic, 1=UTM, 2=State plane. |
short |
get_planimetric_unit()
Returns the dem specification Data Element 8 - Code defining unit of measure for ground planimetric units throughout the file: 0=radians, 1=feet, 2=meters, 3=arc-seconds Normally set to code 2 for 7.5-minute DEM's. |
short |
get_planimetric_zone()
Returns the dem specification Data Element 6 - Code defining zone in ground planimetric reference system 163-168 Codes for State plane and UTM coor- dinate zones are given in appendixes D and E for 7.5-minute DEM's. |
short |
get_polygon_sides()
Returns the dem specification Data Element 10 - The number (n) of sides in the polygon which defines the coverage of the DEM file, normally 4. |
double[] |
get_projection_parameters()
Returns the dem specification Data Element 7 (15 element array) - Map projectionparameters (see appendix F) of measure for ground planimetric coordinates through-out the file Definition of parameters for various projections is given in appendix F. |
int |
get_revision_date()
Returns the dem specification Data Element 22 - Data inspection revision date, YYMM two-digit year and two-digit month. |
short[] |
get_rows_and_columns()
Returns the dem specification Data Element 16 - A two-element array containing the number of rows and columns (m,n) of profiles in the DEM When the row value m is set to 1 the n value describes the number of columns in the DEM file. |
short |
get_smallest_primary()
Returns the dem specification Data Element 19 - Smallest primary. |
short |
get_source_date()
Returns the dem specification Data Element 21 - Data source date YYMM two-digit year and two-digit month. |
double |
get_spacial_rez_x()
convenience method for element 15 - returns spacial resolution x. |
double |
get_spacial_rez_y()
convenience method for element 15 - returns spacial resolution y. |
double |
get_spacial_rez_z()
convenience method for element 15 - returns spacial resolution z. |
short |
get_stats_available()
Type C Data Element 1 - Returns the code indicating availability of statistics in data element 2: 1=available, 0=unavailable |
short |
get_suspect_and_void_flag()
Returns the dem specification Data Element 25 - Suspect and void area flag: 0=none, 1=suspect areas, 2=void areas, 3=suspect and void areas |
short |
get_validation_flag()
Returns the dem specification Data Element 24 - Data validation flag: 0= No validation performed. 1=TESDEM (record C added) no qualitative test (no DEM Edit System [DES] review). 2=Water body edit and TESDEM run. 3=DES (includes water edit) no qualitative test (no TESDEM). 4=DES with record C added, qualita tive and quantitative tests for level 1 DEM. 5=DES and TESDEM qualitative and quantitative tests for levels 2 and 3 DEM's. |
short |
get_vertical_datum()
Returns the dem specification Data Element 26 - Vertical datum: 1=local mean sea level 2=National Geodetic Vertical Datum 1929 (NGVD 29) 3=North American Vertical Datum 1988 (NAVD 88) |
double[] |
get_xyz_resolution()
Returns the dem specification Data Element 15 (a 3 element array) - A three-element array of DEM spatial resolution for x, y, z. |
boolean |
getAvailability()
Type C Data Element 4 - availability of statistics in data element 5.. |
java.lang.String |
getInputFile()
Returns the name of the input file |
boolean |
getStatsAvailable()
Type C Data Element 1 - Returns the availability of statistics in data element 2: |
TypeB |
getTypeB(int index)
Returns the TypeB profile indexed by num. |
short |
maxElevationsForAllProfiles()
This method represents data not contained in the DEM format explicitly, but that is calculated and which is important to imaging applications. |
java.lang.String |
toString()
overrides java.lang.Object.toString() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Dem(java.lang.String inputfile)
String inputfile
inputfile
- String containing path to the DEM input filepublic Dem(java.io.File file)
java.io.File file
file
- java.io.Filepublic Dem(java.net.URL url)
url
- java.net.URL for a demURL
Method Detail |
---|
public java.lang.String getInputFile()
public java.lang.String get_file_name()
public java.lang.String get_mc_origin()
public short get_dem_level_code()
public short get_elevation_pattern()
public short get_planimetric_system()
public short get_planimetric_zone()
public double[] get_projection_parameters()
public short get_planimetric_unit()
public short get_elevation_unit()
public short get_polygon_sides()
public double[][] get_ground_coordinates()
public double[] get_min_and_max_values()
public double get_min_elevation()
public double get_max_elevation()
public double get_counter_angle()
public short get_accuracy_code()
public double[] get_xyz_resolution()
public double get_spacial_rez_x()
public double get_spacial_rez_y()
public double get_spacial_rez_z()
public short[] get_rows_and_columns()
public short get_column_count()
public short get_largest_interval()
public short get_contour_interval_l()
public short get_smallest_primary()
public short get_contour_interval_s()
public short get_source_date()
public int get_revision_date()
public char get_inspection_flag()
public short get_validation_flag()
public short get_suspect_and_void_flag()
public short get_vertical_datum()
public short get_horizontal_datum()
public short get_data_edition()
public short get_percent_void()
public short maxElevationsForAllProfiles()
TypeB
public TypeB getTypeB(int index)
index
- the index of the desired profile
TypeB
public short get_stats_available()
public boolean getStatsAvailable()
public short get_file_rmse()
TypeA.get_planimetric_unit()
,
get_planimetric_unit()
,
TypeA.get_elevation_unit()
,
get_elevation_unit()
public short get_file_rmse_sample_size()
get_file_rmse()
public short get_availability()
public boolean getAvailability()
public short get_data_rmse()
TypeA.get_planimetric_unit()
,
get_planimetric_unit()
,
TypeA.get_elevation_unit()
,
get_elevation_unit()
public short get_data_rmse_sample_size()
get_data_rmse()
public 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 |