Package hec.map.image
Class ImageMap
java.lang.Object
hec.map.MapObject
hec.map.image.ImageMap
- All Implemented Interfaces:
MapObjectInterface,Serializable
- Direct Known Subclasses:
GoogleImageMap,MrSidMap
Geo-referenced image (raster) map.
- See Also:
-
Field Summary
FieldsFields inherited from class hec.map.MapObject
_debug, _extent, _fileOpener, _loaded, _mapId, mCoordinateReferencySystem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreturn the list of File names that the MapObject has.getImage()Returns the image for this ImageMap and increments the reference counter.protected Identifierdoublevoidload()reads ascii file describing geo-limits and image url, then loads imagevoidload(boolean loadImage) Reads the .img file with the extends and image url but will only load the actual binary data if loadImage is true.protected voidload(BufferedReader input, boolean loadImage) voidLoad the image specified in _URLstring.protected voidreadImg(BufferedReader input) voidsetImageFilePath(String path) Sets the path to the file that containts the image datavoidsetRotation(double rotation) voidunload()Decrement the refernce counter.voidwrite()writes ascii file describing geo-limits and image urlvoidwrite(BufferedWriter output) Methods inherited from class hec.map.MapObject
equals, getCoordinateInfo, getCoordinateReferenceSystem, getExtent, getFileOpener, getMapIdentifier, getName, mapIdentifierEquals, 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.MapObjectInterface
getCoordinateReferenceSystem, getExtent, getMapIdentifier, getName, setExtent, setMapIdentifier
-
Field Details
-
_URLstring
-
_imageID
-
-
Constructor Details
-
ImageMap
-
ImageMap
-
ImageMap
public ImageMap()
-
-
Method Details
-
getImage
Returns the image for this ImageMap and increments the reference counter. -
setRotation
public void setRotation(double rotation) -
getRotation
public double getRotation() -
getURLString
-
load
reads ascii file describing geo-limits and image url, then loads image- Specified by:
loadin interfaceMapObjectInterface- Specified by:
loadin classMapObject- Throws:
IOException- Description of Exception
-
load
Reads the .img file with the extends and image url but will only load the actual binary data if loadImage is true.- Parameters:
loadImage-- Throws:
IOException
-
load
- Throws:
IOException
-
readImg
-
write
writes ascii file describing geo-limits and image url- Throws:
IOException
-
write
- Throws:
IOException
-
setImageFilePath
Sets the path to the file that containts the image data -
unload
public void unload()Decrement the refernce counter. If the number of references goes below 1, unload the data for the Image.- Specified by:
unloadin interfaceMapObjectInterface- Specified by:
unloadin classMapObject
-
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
-
loadImage
public void loadImage()Load the image specified in _URLstring. -
getImageID
-