gw_fct_import_epanet_inp - Giswater/giswater_dbmodel GitHub Wiki


Description

"Function to import network data from epanet inp file into database. Create node2arc transforms epanet valves and pumps to node2arc giswater elements, enabling to use this doublegemoetry capability (node on gis tables, arc on epanet tables)"

Input example

SELECT gw_fct_import_epanet_inp($${
"client":{"device":4, "infoType":1, "lang":"ES"},
"form":{}, "feature":{}, 
"data":{"filterFields":{}, "pageInfo":{}, "parameters":{"useNode2arc":"False"}}}$$)::text

Output example

{
  "status": "Accepted",
  "message": {
    "level": 1,
    "text": "Import inp done successfully"
  },
  "version": "{}",
  "body": {
    "form": {},
    "data": {
      "info": {
        "geometryType": "",
        "values": [
          {
            "message": "Constraints of schema temporary disabled -> Done"
          },
          {
            "message": "Inserting data from inp file to temp_csv table -> Done"
          },
          {
            "message": "Creating map zones and catalogs -> Done"
          },
          {
            "message": "WARNING: Values of options / times / report are not updated. Default values of Giswater are keeped"
          },
          {
            "message": "Inserting data into tables using vi_* views -> Done"
          },
          {
            "message": "WARNING: Rules will be stored on inp_rules_importinp table. This is a temporary table. Data need to be moved to inp_rules_x_arc, inp_rules_x_node and inp_rules_x_sector tables to be used later"
          },
          {
            "message": "Creating arc geometry from extremal nodes and intermediate vertex -> Done"
          },
          {
            "message": "Creating arc geometries -> Done"
          }
        ]
      },
      "point": {},
      "line": {}
    }
  }
}