3.1.1.1.1.7. thyrsis.database.load_forages module

load points in site database

USAGE

python -m thyrsis.database.load_forages site srid forages.csv stratigraphie.csv [fracturation.csv]

load forage into the database

site : site name (str)

srid : EPSG id

the expected .csv format is:

  • forages.csv: “Nom”,”Nom_reduit”,”X”,”Y”,”Z”,”H (tube_sol)”,”Z tube”,”Profondeur”,”Date de réalisation”,”Type”,”Localisation”

  • stratigraphie.csv: “Forage”,”From”,”To”,”code_roche”, “description_roche”, “code_formation”, “formation”

  • (facultatif) fracturation.csv: “Forage”,”From”,”To”,”Taux_Frac”

thyrsis.database.load_forages.get_float(string)

convert a string into float, even with a ‘,’ decimal limit

Parameters

string (string) – value to convert

Returns

converted value

Return type

float

thyrsis.database.load_forages.load_forages(cur, site, srid, forage, stratigraphie, fracturation='0')

load borehole values into the current database

Parameters
  • cur (sqlite3.Cursor) – cursor on a sqlite connection

  • site (string) – name of the site

  • srid (string) – epsg code

  • forage (string) – path to a csv file of boreholes

  • stratigraphie (string) – path to a csv file of stratigraphic data

  • fracturation (string) – path to a csv file of fracturation data, if provided

Returns

None