Package hec.map

Class MapObject

java.lang.Object
hec.map.MapObject
All Implemented Interfaces:
MapObjectInterface, Serializable
Direct Known Subclasses:
AiDemBaseMap, AiShapeMap, AnnotationMapObject, DemMap, DlgMap, DxfMap, Flo2dDepthMap, Flo2dElevMap, ImageMap, InundationGroup, NetTinMap, RasterMap, TinMap, TmsMap, VrtMapObject

public abstract class MapObject extends Object implements Serializable, MapObjectInterface
Abstract base class for map objects for Map objects.

See Also:
  • Field Details

    • _mapId

      protected transient MapIdentifier _mapId
    • _extent

      protected WorldRect _extent
    • _loaded

      protected boolean _loaded
    • _debug

      protected boolean _debug
    • _fileOpener

      protected transient FileOpener _fileOpener
    • mCoordinateReferencySystem

      protected CoordinateReferenceSystem mCoordinateReferencySystem
  • Constructor Details

    • MapObject

      public MapObject(String path)
    • MapObject

      public MapObject(MapIdentifier id)
    • MapObject

      public MapObject()
  • Method Details

    • equals

      public boolean equals(MapObject mo)
    • setFileOpener

      public void setFileOpener(FileOpener fileOpener)
    • getFileOpener

      public FileOpener getFileOpener()
    • newFile

      protected Identifier newFile(Identifier pathId)
    • openFile

      public Identifier openFile(Identifier pathId)
    • newThenOpenFile

      protected Identifier newThenOpenFile(Identifier pathId)
    • setMapIdentifier

      public void setMapIdentifier(MapIdentifier id)
      Description copied from interface: MapObjectInterface
      Sets the MapIdentifier attribute of the MapObjectInterface object
      Specified by:
      setMapIdentifier in interface MapObjectInterface
      Parameters:
      id - The new MapIdentifier value
    • getMapIdentifier

      public MapIdentifier getMapIdentifier()
      Description copied from interface: MapObjectInterface
      Gets the MapIdentifier attribute of the MapObjectInterface object
      Specified by:
      getMapIdentifier in interface MapObjectInterface
      Returns:
      The MapIdentifier value
    • getName

      public String getName()
      Description copied from interface: MapObjectInterface
      Gets the Name attribute of the MapObjectInterface object
      Specified by:
      getName in interface MapObjectInterface
      Returns:
      The Name value
    • getCoordinateReferenceSystem

      public CoordinateReferenceSystem getCoordinateReferenceSystem()
      Returns the coordinate reference system that describes the location of this map. Users can return NULL if they don't have CoordinateReferenceSystem.

      Specified by:
      getCoordinateReferenceSystem in interface MapObjectInterface
      Returns:
    • getCoordinateInfo

      @Deprecated public CoordinateInfo getCoordinateInfo()
      Deprecated.
    • setExtent

      public void setExtent(WorldRect rc)
      Description copied from interface: MapObjectInterface
      Sets the Extent attribute of the MapObjectInterface object
      Specified by:
      setExtent in interface MapObjectInterface
      Parameters:
      rc - The new Extent value
    • getExtent

      public WorldRect getExtent()
      Description copied from interface: MapObjectInterface
      Gets the Extent attribute of the MapObjectInterface object
      Specified by:
      getExtent in interface MapObjectInterface
      Returns:
      The Extent value
    • load

      public abstract void load() throws IOException
      Description copied from interface: MapObjectInterface
      Method to tell the Map Object to load its data into memory
      Specified by:
      load in interface MapObjectInterface
      Throws:
      IOException - Description of Exception
    • unload

      public abstract void unload()
      Description copied from interface: MapObjectInterface
      Method to tell the Map Object to unload, because the map is done
      Specified by:
      unload in interface MapObjectInterface
    • getFilenames

      public List getFilenames()
      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.

      Returns:
      the list of Map File names
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • mapIdentifierEquals

      public boolean mapIdentifierEquals(MapIdentifier mapid)
      check to see if the Map specified by the MapIdentifier mapid is the same map as this one

      Parameters:
      mapid -

      Returns:
      true if the mapid references the same map file as this map.
    • readProjection

      public boolean readProjection(Identifier prjId)
      Reads a projection from the file specified by the identifier.

      Parameters:
      prjId -

      Returns: