Package hec.map.aishape
Class AiShapeMap
java.lang.Object
hec.map.MapObject
hec.map.aishape.AiShapeMap
- All Implemented Interfaces:
AiShapeConst,ShapeSource,MapObjectInterface,Serializable
public class AiShapeMap
extends MapObject
implements Serializable, MapObjectInterface, AiShapeConst, ShapeSource
AiShape class manages map layers that conform to the Arc Info shapefile
standard
September 1998
September 1998
- See Also:
-
Field Summary
Fields inherited from class hec.map.MapObject
_debug, _extent, _fileOpener, _loaded, _mapId, mCoordinateReferencySystemFields inherited from interface hec.map.aishape.AiShapeConst
DEBUG, FILE_CODE, HIGHLIGHT_MODIFIER, QUERY_FLASH_LENGTH, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTI_POINT, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POINT_M, SHAPE_TYPE_POINT_Z, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYGON_M, SHAPE_TYPE_POLYGON_Z, SHAPE_TYPE_POLYLINE_M, SHAPE_TYPE_POLYLINE_Z, VERSION, XY_QUERY_TOLERANCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCalculate and return the shp file length in bytes.intCalculate and return the shx file length in bytes.voidDeprecated.Returns the coordinate reference system that describes the location of this map.return the list of File names that the MapObject has.getShapeObjects(double containmentBuffer, WorldPt pt) Returns a list of "Import" Shape Objects from this source.intgetType()voidhighlightRecords(List shapes, int centerPointGraphic) voidinit()voidload()Read shape file for shape type.booleanreadFile(MapIdentifier shpId) Read the three associated shape files.booleanreadProjection(Identifier prjId) Reads the project for the shapefile.voidvoidunload()Decrement the refernce counter.voidSet this map's data to the arg data and write it to file.booleanwriteFile(Identifier shpId) Methods inherited from class hec.map.MapObject
equals, getExtent, getFileOpener, getMapIdentifier, getName, mapIdentifierEquals, newFile, newThenOpenFile, openFile, 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
getExtent, getMapIdentifier, getName, setExtent, setMapIdentifierMethods inherited from interface hec.map.importer.ShapeSource
getName
-
Constructor Details
-
AiShapeMap
-
AiShapeMap
-
AiShapeMap
public AiShapeMap()
-
-
Method Details
-
getType
public int getType() -
init
public void init() -
getShapes
Description copied from interface:ShapeSourceReturns a list of "Import" Shape Objects from this source.- Specified by:
getShapesin interfaceShapeSource- Returns:
-
getAttributes
-
getFieldDescriptors
- Specified by:
getFieldDescriptorsin interfaceShapeSource- Returns:
-
getShapeObjects
-
writeData
Set this map's data to the arg data and write it to file. -
calculateShpFileLength
public int calculateShpFileLength()Calculate and return the shp file length in bytes. -
calculateShxFileLength
public int calculateShxFileLength()Calculate and return the shx file length in bytes. -
load
Read shape file for shape type. Read consists of reading three separate files:
*.shp - main shape file data
*.shx - an index file containg offset and content length for shape objects in *.shp file
*.dbf - dbase format file containing attributes- Specified by:
loadin interfaceMapObjectInterface- Specified by:
loadin classMapObject- Throws:
IOException- Description of Exception
-
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
-
writeFile
-
readProjection
Reads the project for the shapefile. We have kept the "coordianteInfo" routines for backwards compatibility. New users should use getCoordinateReferenceSystem();- Overrides:
readProjectionin classMapObject- Parameters:
prjId-- Returns:
-
readFile
Read the three associated shape files. -
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
-
highlightRecords
- Specified by:
highlightRecordsin interfaceShapeSource
-
clearHighlights
public void clearHighlights()- Specified by:
clearHighlightsin interfaceShapeSource
-
getCoordinateReferenceSystem
Description copied from class:MapObjectReturns the coordinate reference system that describes the location of this map. Users can return NULL if they don't have CoordinateReferenceSystem.- Specified by:
getCoordinateReferenceSystemin interfaceMapObjectInterface- Specified by:
getCoordinateReferenceSystemin interfaceShapeSource- Overrides:
getCoordinateReferenceSystemin classMapObject- Returns:
- the WKT or NULL if there is no projection.
-
getCoordinateInfo
Deprecated.- Overrides:
getCoordinateInfoin classMapObject
-
setCoordinateReferenceSystem
- Parameters:
crs-
-