# Grid Pipe File¶

File extension: gpi

## File Object¶

class gsshapy.orm.GridPipeFile[source]

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

Object interface for the Grid Pipe File.

The grid pipe file is used to map the grid pipe network for subsurface drainage to the model grid. The contents of the grid pipe file is abstracted into two types of objects including: GridPipeCell and GridPipeNode. Each cell lists the pipe nodes that are contained in the cell and each pipe node defines the percentage of a pipe that is contained inside a cell. See the documentation provided for each object for a more details.

See: http://www.gsshawiki.com/Subsurface_Drainage:Subsurface_Drainage
tableName = 'gpi_grid_pipe_files'

Database tablename

id

PK

gridPipeCells

RELATIONSHIP

projectFile

RELATIONSHIP

pipeCells

INTEGER

fileExtension

STRING

## Supporting Objects¶

class gsshapy.orm.GridPipeCell(cellI, cellJ, numPipes)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Object containing the pipe data for a single grid cell. A cell can contain several pipe nodes.

tableName = 'gpi_grid_pipe_cells'

Database tablename

id

PK

gridPipeFileID

FK

gridPipeFile

RELATIONSHIP

gridPipeNodes

RELATIONSHIP

cellI

INTEGER

cellJ

INTEGER

numPipes

INTEGER

class gsshapy.orm.GridPipeNode(linkNumber, nodeNumber, fractPipeLength)[source]

Bases: sqlalchemy.ext.declarative.api.Base

Object containing data for a single pipe.

tableName = 'gpi_grid_pipe_nodes'

Database tablename

id

PK

gridPipeCellID

FK

gridPipeCell

RELATIONSHIP

linkNumber

INTEGER

nodeNumber

INTEGER

fractPipeLength

FLOAT