6.1.2.12. thyrsis.spatialitemeshdataprovider module

class thyrsis.spatialitemeshdataprovider.SpatialiteMeshConstDataProvider(uri='', providerOptions=<qgis._core.QgsDataProvider.ProviderOptions object>, flags=None)

Bases : thyrsis.meshlayer.meshdataprovider.MeshDataProvider

Spatialite const mesh data provider

PROVIDER_KEY = 'thyrsis_const_provider'
conversionFactor(units=None)

conversion from the set units to any units, if units is not specify, return in SI units

Paramètres

units (string) – units

Renvoie

factor

Type renvoyé

float

classmethod createProvider(uri, providerOptions)
classmethod description()

Returns the spatialite mesh provider description

elementValues()

return values at elements

Renvoie

values at nodes

Type renvoyé

ndarray

extent()

Return extent

Renvoie

extent

Type renvoyé

QgsRectangle

maxValue(index=None)

Return max mesh value

Paramètres

index (dict) – node index

Renvoie

max value

Type renvoyé

float

minValue(index=None)

Return max mesh value

Paramètres

index (dict) – node index

Renvoie

max value

Type renvoyé

float

name()

Return provider key

Renvoie

key

Type renvoyé

string

nodeCoord(zColumn='0')

return a list of coordinates

Paramètres

zColumn (string) – formula for column height or altitude

Renvoie

return a list of coordinates

Type renvoyé

ndarray

nodeValues()

return values at nodes

Renvoie

values at nodes

Type renvoyé

ndarray

classmethod providerKey()

Returns the spatialite mesh provider key

resultColumn()

Return current column

Renvoie

current column

Type renvoyé

string

sourceUnits = {'altitude': 'm', 'altitude_mur': 'm', 'epaisseur_zns': 'm', 'epaisseur_zs': 'm', 'permeabilite_x': 'm/s', 'potentiel': 'm', 'potentiel_reference': 'm', 'v_norme': 'm/s'}
triangles()

return a list of triangles described by node indices

Renvoie

triangles

Type renvoyé

list

update_values()

Update mesh values

valueAtElement()

Return if the mesh is element based

Renvoie

state

Type renvoyé

bool

valuesAt(point)

return a list of values at a given point, interpolate values if needed

Paramètres

point (tuple) – point xy

Renvoie

value

Type renvoyé

float

class thyrsis.spatialitemeshdataprovider.SpatialiteMeshDataProvider(uri='', providerOptions=<qgis._core.QgsDataProvider.ProviderOptions object>, flags=None)

Bases : thyrsis.meshlayer.meshdataprovider.MeshDataProvider

Spatialite mesh data provider

PROVIDER_KEY = 'thyrsis_provider'
altitudeAt(point)

return altitude given point, interpolate values if needed

Paramètres

point (tuple) – point xy

Renvoie

value

Type renvoyé

float

availableColumns()

returns a list (display name, colummn name) for available results

Renvoie

available column

Type renvoyé

list

availableUnits()

Return available units

Renvoie

available units

Type renvoyé

dict

columnChanged
conn()

Return database connection

Retunr

db connection

Type renvoyé

sqlite3.Connection

contours()

Return a map with the contour (name, group) as key and an array of vertices as values, contours are 3D

Renvoie

contours

Type renvoyé

dict

conversionFactor(units=None)

conversion from the set units to any units, if units is not specify, return in SI units

Paramètres

units (string) – units

classmethod createProvider(uri, providerOptions)
database()

Return db path

Renvoie

db path

Type renvoyé

string

classmethod description()

Returns the spatialite mesh provider description

displayName = {'concentration': 'Concentration', 'concentration2': 'Concentration second milieu', 'potentiel': 'Potentiel', 'potentiel2': 'Potentiel second milieu', 'probability': 'Probabilité', 'probability2': 'Probabilité second milieu', 'saturation': 'Saturation', 'saturation2': 'Saturation second milieu', 'vitesse_darcy_norme': 'Vitesse de Darcy', 'vitesse_darcy_norme2': 'Vitesse de Darcy second milieu'}
elementValues()

return values at elements

Renvoie

values at nodes

Type renvoyé

ndarray

extent()

Return extent

Renvoie

extent

Type renvoyé

QgsRectangle

getDatabasePath()
mass_balance()

compute mass balance

Return sat

sat values

Rtype sat

list

Return out

out values

Rtype out

list

Return insat

insat values

Rtype insat

list

maxValue(index=None)

Return max mesh value

Paramètres

index (dict) – node index

Renvoie

max value

Type renvoyé

float

measuresAt(point, withinDistance=0.5)

returns a map of measures in the vicinity of the considered point the map as the mesure type as key and [(date, value, uncertainty)] as values

Paramètres
  • point (tuple) – point xy

  • withinDistance (float) – snap distance

Renvoie

measures

Type renvoyé

dict

minValue(index=None)

Return min mesh value

Paramètres

index (dict) – node index

Renvoie

min value

Type renvoyé

float

name()

Return provider key

Renvoie

key

Type renvoyé

string

nodeCoord(zColumn='0')

return a list of coordinates

Paramètres

zColumn (string) – formula for column height or altitude

Renvoie

return a list of coordinates

Type renvoyé

ndarray

nodeValues()

return values at nodes

Renvoie

values at nodes

Type renvoyé

ndarray

classmethod providerKey()

Returns the spatialite mesh provider key

removeColumn(columnName)

Use to remove npy files when re-run simulation otherwise mesh form previous simulation will be available like probability map

Paramètres

columnName (string) – columnName

resultColumn()

Return current column

Renvoie

current column

Type renvoyé

string

scatters()

return a map with the contour name as key and an point as value

Renvoie

scatters

Type renvoyé

list

setResultColumn(columnName)

Set the current column

Paramètres

columnName (string) – columnName

setUnits(units)

Set units

Paramètres

units (string) – units

settings()

Return Thyrsis settings

Renvoie

Thyrsis settings

Type renvoyé

Settings

sourceUnits = {'concentration': 'kg/m³', 'concentration2': 'kg/m³', 'potentiel': 'm', 'potentiel2': 'm', 'probability': '-', 'probability2': '-', 'saturation': '-', 'saturation2': '-', 'vitesse_darcy_norme': 'm/s', 'vitesse_darcy_norme2': 'm/s'}
triangles()

return a list of triangles described by node indices

Renvoie

triangles

Type renvoyé

list

units()

Return current units

Renvoie

units

Type renvoyé

string

unitsChanged
valueAtElement()

Return if the mesh is element based

Renvoie

state

Type renvoyé

bool

valuesAt(point, svalue=False)

return a list of values at a given point, interpolate values if needed, returns sigma values if required and available

Paramètres
  • point (tuple) – point xy

  • svalue (bool) – sigma values flag

Renvoie

value

Type renvoyé

float