Map Files

Although index maps and other raster maps are both GRASS ASCII maps, a special table was created for index maps for easier implementation.

Index Map File Object

File extension: idx

This file object supports spatial objects.

class gsshapy.orm.IndexMap(name=None)[source]

Bases: sqlalchemy.ext.declarative.api.Base, gsshapy.base.file_base.GsshaPyFileObjectBase, gsshapy.base.rast.RasterObjectBase

Object interface for Index Map Files.

GSSHA uses GRASS ASCII rasters to store spatially distributed parameters. Index maps are stored using a different object than other raster maps, because they are closely tied to the mapping table file objects and they are stored with different metadata than the other raster maps. Index maps are declared in the mapping table file.

The values for each cell in an index map are integer indices that correspond with the indexes of the mapping tables that reference the index map. Many different hydrological parameters are distributed spatially in this manner. The result is that far fewer maps are needed to parametrize a GSSHA model.

If the spatial option is enabled when the rasters are read in, the rasters will be read in as PostGIS raster objects. There are no supporting objects for index map file objects.

This object inherits several methods from the gsshapy.orm.RasterObjectBase base class for generating raster visualizations.

See: http://www.gsshawiki.com/Mapping_Table:Index_Maps

tableName = 'idx_index_maps'

Database tablename

rasterColumnName = 'raster'

Raster column name

defaultNoDataValue = -1

Default no data value

discreet = True

Index maps should be discreet

id

PK

mapTableFileID

FK

north

FLOAT

south

FLOAT

east

FLOAT

west

FLOAT

rows

INTEGER

columns

INTEGER

srid

SRID

filename

STRING

raster

RASTER

fileExtension

STRING

mapTableFile

RELATIONSHIP

mapTables

RELATIONSHIP

indices

RELATIONSHIP

contaminants

RELATIONSHIP

name

STRING

rasterText

STRING

write(directory, name=None, session=None, replaceParamFile=None)[source]

Index Map Write to File Method

Raster Map File Object

File extensions: Variable (e.g.: ele, msk, aqe)

This file object supports spatial objects.

class gsshapy.orm.RasterMapFile[source]

Bases: sqlalchemy.ext.declarative.api.Base, gsshapy.base.file_base.GsshaPyFileObjectBase, gsshapy.base.rast.RasterObjectBase

Object interface for Raster Map type files.

GSSHA uses GRASS ASCII rasters to store spatially distributed parameters. Rasters that are not index maps are stored using this object. Index maps are stored separately, because they are closely tied to the mapping table file objects and they are stored with different metadata than the other raster maps.

Raster maps are declared in the project file. Examples of cards that require raster maps are ELEVATION, ROUGHNESS WATERSHED_MASK, WATER_TABLE, and MOISTURE. Many of these map inputs are mutually exclusive with the mapping tables for the same variable.

If the spatial option is enabled when the rasters are read in, the rasters will be read in as PostGIS raster objects. There are no supporting objects for raster map file objects.

This object inherits several methods from the gsshapy.orm.RasterObjectBase base class for generating raster visualizations.

See: http://www.gsshawiki.com/Project_File:Project_File

tableName = 'raster_maps'

Database tablename

rasterColumnName = 'raster'

Raster column name

defaultNoDataValue = 0

Default no data value

id

PK

projectFileID

FK

north

FLOAT

south

FLOAT

east

FLOAT

west

FLOAT

rows

INTEGER

columns

INTEGER

fileExtension

STRING

rasterText

STRING

raster

RASTER

filename

STRING

projectFile

RELATIONSHIP