Skip to content

2b. old import methods

henrik edited this page Feb 19, 2018 · 2 revisions

This page describes the old methods, used in the plugin until version 1.3.9

These methods will be kept in a few future versions of the plugin to maintain backwards compatibility. The import methods are found in the plugin menu: "Midvatten - Import data to database - Old csv imports"

img

Import water level measurements from a .csv file

  1. Save your water level measurements in a CSV file with four columns: OBSID, DATE_AND_TIME, MEASUREMENT, COMMENT *

  2. In your QGIS project, select Midvatten-Import Data Import W Level measurements

  3. Follow instructions in pop-up dialog.

  4. QGIS may not respond for a few seconds after selection of the import file but don't panic! QGIS will respond to your input as soon as the import and associated data handling** is ready.

* Please note that: The file must be either a comma, or semicolon-separated. date_time must be of format 'yyyy-mm-dd hh:mm(:ss)'. Decimal separator must be point (.) Comma or semicolon is not allowed in the comments. Column names are actually not important but column order is. Empty or null values are not allowed for obsid or date_time, such rows will be excluded from the import. Neither are empty or null values accepted at the same time in both the columns meas and comment. Each combination of obsid and date_time must be unique.

** including a vacuum of database file to reduce size on disk

Import water level measurements from data logger

  1. Get data from data logger with software specific for your logger

  2. Perform barometric compensation

  3. Export data as CSV *

  4. Open the CSV file in your favourite text editor (it is recommended that you get something better than WinOS default text editor)

    1. remove any additional lines in the top of the file so that there is only one header line and then data
    2. remove any additional lines by the end of your file, the last line should be data
    3. Save temporary version of the edited CSV file in the appropriate place
  5. In your QGIS project:

    1. Select the layer obs_points
    2. Select the obs point for which logger data will be imported
    3. Choose Midvatten-Import Data Import W Level from logger
    4. Follow instructions in pop-up dialog
      img
  6. QGIS may not respond for a few seconds after selection of the import file but don't panic! QGIS will respond to your input as soon as the import and associated data handling** is ready.

* This import functions is designed to read files from Diver-Office, thus expecting either 3 or 4 columns depending on wether conductivity is logged. Column names are not important but column order is.

** including a vacuum of database file to reduce size on disk

Import water quality field measurements from a .csv file

  1. Save your water quality field measurements in CSV file with ten columns: obsid, staff, date_time, instrument, parameter, reading_num, reading_txt, unit, flow_lpm, comment*

  2. In your QGIS project, select Midvatten-Import Data to database - Import W Quality from field

  3. Follow instructions in pop-up dialog
    img

  4. QGIS may not respond for a few seconds after selection of the import file but don't panic! QGIS will respond to your input as soon as the import and associated data handling** is ready.

* Please note that: The file must be either a comma, or semicolon-separated. date_time must be of format 'yyyy-mm-dd hh:mm(:ss)'. Decimal separator must be point (.) Comma or semicolon is not allowed in the comments. Column names are actually not important but column order is. Empty or null values are not allowed for obsid, date_time or parameter, such rows will be excluded from the import. Each combination of obsid, date_time and parameter must be unique.

** including a vacuum of database file to reduce size on disk

Import water quality laboratory analyses from a .csv file

  1. Save your water quality laboratory analyses in CSV file with 12 columns according to the pop-up dialog shown below.*

  2. In your QGIS project, select Midvatten-Import Data to database - Import W Quality from lab

  3. Follow instructions in pop-up dialog
    img

  4. QGIS may not respond for a few seconds after selection of the import file but don't panic! QGIS will respond to your input as soon as the import and associated data handling** is ready.

* Please note that: The file must be either a comma, or semicolon-separated. date_time must be of format 'yyyy-mm-dd hh:mm(:ss)'. Decimal separator must be point (.) Comma or semicolon is not allowed in the comments. Column names are actually not important but column order is. Empty or null values are not allowed for obsid, report or parameter, such rows will be excluded from the import. Each combination of report and parameter must be unique.

** including a vacuum of database file to reduce size on disk

Import stratigraphy data from a .csv file

  1. Save your stratigraphy data in a CSV file with 9 columns according to stratigraphy_table specification.*

  2. In your QGIS project, select Midvatten-Import Data to database - Import stratigraphy data

  3. Follow instructions in pop-up dialog
    img

  4. QGIS may not respond for a few seconds after selection of the import file but don't panic! QGIS will respond to your input as soon as the import and associated data handling** is ready.

* Please note that: The file must be either a comma, or semicolon-separated. Decimal separator must be point (.), avoid thousands separator. Comma or semicolon should be avoided in the comments. Empty or null values are not allowed for obsid or stratid, such rows will be excluded from the import. Each combination of obsid and stratid must be unique.

** including a vacuum of database file to reduce size on disk

Import observation points data from a .csv file

  1. Save your observation points data in a CSV file with 26 columns according to observation point table specification.*

  2. In your QGIS project, select Midvatten-Import Data to database - Import obs_points_table

  3. Follow instructions in pop-up dialog
    img

  4. QGIS may not respond for a few seconds after selection of the import file but don't panic! QGIS will respond to your input as soon as the import and associated data handling** is ready.

  5. To be able to see your imported observation points you must update map position from coordinates (assuming you included coordinates in your import file).

* Please note that: The file must be either a comma, or semicolon-separated. Decimal separator must be point (.), avoid thousands separator. Comma or semicolon should be avoided in the comments. Empty or null values are not allowed for obsid and there must not be any duplicates of obsid.

** including a vacuum of database file to reduce size on disk

Import water flow readings from a .csv file

  1. Save your water flow readings in a CSV file with 7 columns according to wflow table specification.*

  2. In your QGIS project, select Midvatten-Import Data to database - Import w_flow measurements

  3. Follow instructions in pop-up dialog
    img

  4. QGIS may not respond for a few seconds after selection of the import file but don't panic! QGIS will respond to your input as soon as the import and associated data handling** is ready.

* Please note that: The file must be either a comma, or semicolon-separated. Decimal separator must be point (.), avoid thousands separator. Comma or semicolon should be avoided in the comments. Be sure to use a limited number of flowtypes since all new flowtypes will silently be added to the database table zz_flowtype during import. Empty or null values are not allowed for obsid, instrumentid, flowtype or date_time. Each combination of obsid, instrumentid, flowtype or date_time must be unique.

** including a vacuum of database file to reduce size on disk

Clone this wiki locally