pytuflow.GisInput

pytuflow.GisInput#

class GisInput(parent, command)#

Bases: GisInputBase

Class for handling GIS inputs (Vector only).

GIS inputs have very specific requirements. This class handles the following scenarios:

  • reading multiple files on a single line

  • reading a file then an index (indicating which column to attribute column to use) e.g. Read GIS Mat == 2d_mat.shp | 3

  • reading a vector file | float value | raster file e.g. command Read GIS Zpts Modify Conveyance == river.shp | 3.2 | conv.tif

  • read the vector file and find file references within the attribute table e.g. 1d_nwk layer using a M channel which can reference files within the attribute table

Parameters:
  • parent (ControlFileBuildState)

  • command (Command)

__init__(parent, command)#
Parameters:
  • parent (ControlFileBuildState)

  • command (Command)

Methods

context

Create a RunState version of this object.

file_scope

Public function that will return the scope of a given file.

is_end_block

Returns whether this input is the end of a block.

is_match

Returns True if the input matches the search parameters, which is made of multiple parameters.

is_start_block

Returns whether this input is the start of a block.

record_change

Not private, but not for users to use directly either.

write

Write the object to file.

Attributes

TUFLOW_TYPE

A string identifying the PyTUFLOW object type.

attr_idx

cf

comment

dirty

Whether the object has been changed since it was last written to file.

files

geoms

has_missing_files

lhs

Property holding the LHS string part of Command == Value

rhs

Property holding the value part of Command == Value.

scope

List of scopes associated with the object.

value

Property holding the value part of Command == Value.

parent

Parent object, if any.

config

Configuration settings for the TUFLOW model.

uuid

A unique identifier for the input, generated when the input is created.

trd

The .trd file that this input is from.

part_count

The number of parts in the input command.