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

public class ImageMap extends MapObject implements MapObjectInterface
Geo-referenced image (raster) map.

See Also:
  • Field Details

    • _URLstring

      protected String _URLstring
    • _imageID

      protected Identifier _imageID
  • Constructor Details

    • ImageMap

      public ImageMap(String path)
    • ImageMap

      public ImageMap(MapIdentifier id)
    • ImageMap

      public ImageMap()
  • Method Details

    • getImage

      public Image getImage()
      Returns the image for this ImageMap and increments the reference counter.
    • setRotation

      public void setRotation(double rotation)
    • getRotation

      public double getRotation()
    • getURLString

      public String getURLString()
    • load

      public void load() throws IOException
      reads ascii file describing geo-limits and image url, then loads image
      Specified by:
      load in interface MapObjectInterface
      Specified by:
      load in class MapObject
      Throws:
      IOException - Description of Exception
    • load

      public void load(boolean loadImage) throws IOException
      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

      protected void load(BufferedReader input, boolean loadImage) throws IOException
      Throws:
      IOException
    • readImg

      protected void readImg(BufferedReader input)
    • write

      public void write() throws IOException
      writes ascii file describing geo-limits and image url
      Throws:
      IOException
    • write

      public void write(BufferedWriter output) throws IOException
      Throws:
      IOException
    • setImageFilePath

      public void setImageFilePath(String path)
      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 interface MapObjectInterface
      Specified by:
      unload in class MapObject
    • getFilenames

      public List 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 class MapObject
      Returns:
      the list of Map File names
    • loadImage

      public void loadImage()
      Load the image specified in _URLstring.
    • getImageID

      protected Identifier getImageID()