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 Identifier
double
void
load()
reads ascii file describing geo-limits and image url, then loads imagevoid
load
(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 void
load
(BufferedReader input, boolean loadImage) void
Load the image specified in _URLstring.protected void
readImg
(BufferedReader input) void
setImageFilePath
(String path) Sets the path to the file that containts the image datavoid
setRotation
(double rotation) void
unload()
Decrement the refernce counter.void
write()
writes ascii file describing geo-limits and image urlvoid
write
(BufferedWriter output) Methods inherited from class hec.map.MapObject
equals, getCoordinateInfo, getCoordinateReferenceSystem, getExtent, getFileOpener, getMapIdentifier, getName, mapIdentifierEquals, newFile, newThenOpenFile, openFile, readProjection, setExtent, setFileOpener, setMapIdentifier, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
load
in interfaceMapObjectInterface
- Specified by:
load
in 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:
unload
in interfaceMapObjectInterface
- Specified by:
unload
in classMapObject
-
getFilenames
Description copied from class:MapObject
return 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:
getFilenames
in classMapObject
- Returns:
- the list of Map File names
-
loadImage
public void loadImage()Load the image specified in _URLstring. -
getImageID
-