| 
 | j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.loaders.dem.DEMParser
public class DEMParser
A low-level parser for the DEM file format.
The output of this parser is the records as per the file and the option of a raw height array.
The definition of the file format can be found at: http://edcwww.cr.usgs.gov/glis/hyper/guide/1_dgr_dem
| Constructor Summary | |
|---|---|
| DEMParser()Construct a new parser with no stream set. | |
| DEMParser(java.io.InputStream is)Construct a new parser using the given stream to source the data from. | |
| DEMParser(java.io.Reader rdr)Construct a new parser using the given reader to source the data from. | |
| Method Summary | |
|---|---|
|  void | clear()Force a clear of the data that has been previous read by this parser. | 
|  float[] | getGridStep()Fetch information about the real-world stepping sizes that this grid uses. | 
|  float[][] | getHeights()Create a new height array from the pre-parsed values. | 
|  DEMTypeARecord | getTypeARecord()Get the header used to describe the last stream parsed. | 
|  DEMTypeBRecord[] | getTypeBRecords()Fetch all of the type B records that were registered in this file. | 
|  DEMTypeCRecord | getTypeCRecord()Get the type C record from the file. | 
|  float[][] | parse(boolean returnHeights)Do all the parsing work. | 
|  void | reset(java.io.InputStream is)Reset the parser to use the new stream. | 
|  void | reset(java.io.Reader rdr)Reset the parser to use the new stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DEMParser()
public DEMParser(java.io.InputStream is)
is - The stream to read data frompublic DEMParser(java.io.Reader rdr)
rdr - The stream to read data from| Method Detail | 
|---|
public void clear()
public void reset(java.io.InputStream is)
is - The new stream to usepublic void reset(java.io.Reader rdr)
rdr - The stream to read data frompublic DEMTypeARecord getTypeARecord()
public DEMTypeBRecord[] getTypeBRecords()
public DEMTypeCRecord getTypeCRecord()
public float[][] getHeights()
getHeights in interface HeightMapSourcepublic float[] getGridStep()
getGridStep in interface HeightMapSource
public float[][] parse(boolean returnHeights)
                throws java.io.IOException
returnHeights - true if this should return the array of height values
IncorrectFormatException - The file is not one our parser
    understands
ParsingErrorException - An error parsing the file
java.io.IOException| 
 | j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||