public class SRTMTile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
DEM_SRC_CODES
Mappings of NASADEM source code byte values to names of data sources as
defined here.
|
short |
maxGradient
The maximum change in elevation between any two adjacent cells, in meters.
|
short |
maxZ
The highest elevation in this tile, in meters.
|
int |
minLat
The integer latitude (in whole degrees) of the southwest corner of the tile.
|
int |
minLon
The integer longitude (in whole degrees) of the southwest corner of the tile.
|
short |
minZ
The lowest elevation in this tile, in meters.
|
static short |
NO_CELL
Reserved value indicating the elevation at the specified grid point is unknown.
|
short |
numCellsPerAxis
The number of grid cells + 1 in this tile.
|
byte[] |
sources
If an associated .num file is provided with the .hgt file, this contains the
code numbers identifying all unique sources of the elevation data in this tile.
|
short[][] |
zCells
The two-dimensional grid of regularly spaced elevation values (separated by
1 degree / (numCellsPerAxis - 1)), The first index is along the latitude axis,
with index 0 at the southernmost latitude, and the second index is along the
longitude axis, with index 0 at the westernmost longitude.
|
Constructor and Description |
---|
SRTMTile() |
Modifier and Type | Method and Description |
---|---|
int |
getSize()
Report the amount of memory consumed by this tile.
|
void |
loadGzip(java.io.File srtmFile,
int lat,
int lon)
Read a tile file into this in-memory data structure
|
void |
loadZip(java.io.File srtmFile,
int lat,
int lon)
Read a zipped tile file into this in-memory data structure
|
void |
setCoord(SRTMTileId id)
Set the lower-left corner coordinates of this tile.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
public int minLat
public int minLon
public short numCellsPerAxis
public short maxGradient
public short minZ
public short maxZ
public short[][] zCells
public byte[] sources
public static final java.lang.String[] DEM_SRC_CODES
public static final short NO_CELL
public java.lang.String toString()
toString
in class java.lang.Object
public void setCoord(SRTMTileId id)
id
- SRTMTileId to obtain coordinates frompublic void loadZip(java.io.File srtmFile, int lat, int lon) throws java.io.IOException
srtmFile
- File object describing the file to readlat
- latitude in whole degrees North for the tilelon
- longitude in whole degrees East for the tilejava.io.IOException
- if the file could not be successfully read for any reasonpublic void loadGzip(java.io.File srtmFile, int lat, int lon) throws java.io.IOException
srtmFile
- File object describing the file to readlat
- latitude in whole degrees North for the tilelon
- longitude in whole degrees East for the tilejava.io.IOException
- if the file could not be successfully read for any reasonpublic int getSize()