Package hec.map.aidem
Class AiDemFltMap
java.lang.Object
hec.map.MapObject
hec.map.aidem.AiDemBaseMap
hec.map.aidem.AiDemFltMap
- All Implemented Interfaces:
ElevationMap,GridMap,MapObjectInterface,Serializable
public class AiDemFltMap
extends AiDemBaseMap
implements Serializable, MapObjectInterface, ElevationMap, GridMap
Map Object class for reading ESRI Binary Grid files. The Binary Grid file data are stored in two
files, a .flt and a .hdr. The FLT file contains all of the binary grid data, and the HDR file contains
the header information such as grid location and cell size.
- See Also:
-
Field Summary
FieldsFields inherited from class hec.map.aidem.AiDemBaseMap
_cellsize, _data, _lowerLeftCorner, _maxElev, _minElev, _nodata, _numcol, _numrowFields inherited from class hec.map.MapObject
_debug, _extent, _fileOpener, _loaded, _mapId, mCoordinateReferencySystem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfillArray(float[] dest, long destPosition, long srcPosition, int length) Fills the destination array with data from this map starting at destPosition reading from srcPosition for length # of values.return the list of File names that the MapObject has.voidload()Loads the binaryvoidvoidbooleanmapIdentifierEquals(MapIdentifier mapid) check to see if the Map specified by the MapIdentifier mapid is the same map as this one.voidsetAreaHeight(int numRow) set the number of rows in the map and redimensions the map.voidsetAreaSize(int rows, int cols) voidsetAreaWidth(int numCol) set the number of columns in the map and redimensions the map.voidsetCellSize(double cellSize) sets the width/height of each cell in the grid.booleansetElevation(double e, double n, float val) booleansetElevation(WorldPt pt, float val) set an elevation value for a given point on the map.voidvoidunload()Method to tell the Map Object to unload, because the map is donebooleanwriteFile(Identifier fltId) protected booleanwriteHeader(Identifier hdrId) Methods inherited from class hec.map.aidem.AiDemBaseMap
cellToWorldPt, cellToWorldPt, getAreaHeight, getAreaWidth, getData, getElevation, getElevation, getGridCellSize, getLowerLeftCorner, getMaximumElevation, getMinimumElevation, getName, getNoDataValue, getResolutionX, getResolutionY, init, setNoDataValue, supportsNoDataValue, worldPtToCell, worldPtToCellMethods inherited from class hec.map.MapObject
equals, getCoordinateInfo, getCoordinateReferenceSystem, getExtent, getFileOpener, getMapIdentifier, newFile, newThenOpenFile, openFile, readProjection, setExtent, setFileOpener, setMapIdentifier, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.map.ElevationMap
getElevation, getElevation, getMaximumElevation, getMinimumElevation, getNameMethods inherited from interface hec.map.GridMap
getGridCellSize, getNoDataValue, supportsNoDataValueMethods inherited from interface hec.map.MapObjectInterface
getCoordinateReferenceSystem, getExtent, getMapIdentifier, setExtent, setMapIdentifier
-
Field Details
-
EXTENSION
- See Also:
-
-
Constructor Details
-
AiDemFltMap
-
AiDemFltMap
-
AiDemFltMap
public AiDemFltMap()
-
-
Method Details
-
getFilenames
Description copied from class:MapObjectreturn the list of File names that the MapObject has. The first filename in the list must be the main file (ie for shape files it should be the .shp file, usually_mapId.getPath()). Subclasses should override this method if they have more than 1 file.- Overrides:
getFilenamesin classMapObject- Returns:
- the list of Map File names
-
unload
public void unload()Description copied from interface:MapObjectInterfaceMethod to tell the Map Object to unload, because the map is done- Specified by:
unloadin interfaceMapObjectInterface- Overrides:
unloadin classAiDemBaseMap
-
load
Loads the binary- Specified by:
loadin interfaceMapObjectInterface- Overrides:
loadin classAiDemBaseMap- Throws:
IOException- Description of Exception
-
loadHeader
- Specified by:
loadHeaderin classAiDemBaseMap- Throws:
IOException
-
fillArray
public boolean fillArray(float[] dest, long destPosition, long srcPosition, int length) throws IOException Fills the destination array with data from this map starting at destPosition reading from srcPosition for length # of values.- Specified by:
fillArrayin classAiDemBaseMap- Throws:
IOException
-
loadBin
- Throws:
IOException
-
writeFile
-
writeHeader
- Parameters:
hdrId-- Returns:
-
setElevation
set an elevation value for a given point on the map. If that point is outside the bounds of the map, nothing is set with the methodgetNoDataValue()- Parameters:
pt- WorldPt- Returns:
- float
-
setElevation
public boolean setElevation(double e, double n, float val) -
setAreaHeight
public void setAreaHeight(int numRow) set the number of rows in the map and redimensions the map. existing data is lost- Parameters:
numRow- new number of rows
-
setAreaWidth
public void setAreaWidth(int numCol) set the number of columns in the map and redimensions the map. existing data is lost- Parameters:
numCol- new number of columns
-
setAreaSize
public void setAreaSize(int rows, int cols) -
setLowerLeftCorner
-
setCellSize
public void setCellSize(double cellSize) sets the width/height of each cell in the grid. -
mapIdentifierEquals
check to see if the Map specified by the MapIdentifier mapid is the same map as this one. AiDem files create a binary version of the ascii file so the test needs to check both the .asc and the .ascbin extensions.- Overrides:
mapIdentifierEqualsin classMapObject- Parameters:
mapid-- Returns:
- true if the mapid references the same map file as this map.
-