gw_fct_pg2epa_check_data - Giswater/giswater_dbmodel GitHub Wiki
Description
Function to check result data before inp file creation (it depends only of the whole network consistency)
Input example
SELECT gw_fct_pg2epa_check_network('{
"data":{"parameters":{"resultId":"z1","fid":227}}}')::json; -- when is called from go2epa
SELECT gw_fct_pg2epa_check_data($${
"client":{"device":4, "infoType":1, "lang":"ES"},
"form":{}, "feature":{},
"data":{"filterFields":{}, "pageInfo":{}, "parameters":{}}}$$); -- when is called from toolbox
Output example
{
"status": "Accepted",
"message": {
"level": 1,
"text": "Data quality analysis done succesfully"
},
"version": "3.5.002",
"body": {
"form": {},
"data": {
"info": {
"geometryType": "",
"values": [
{
"message": "DATA QUALITY ANALYSIS ACORDING EPA RULES"
},
{
"message": "-----------------------------------------------------------"
},
{
"message": ""
},
{
"message": "CRITICAL ERRORS"
},
{
"message": "----------------------"
},
{
"message": "ERROR: There is/are 1 node's orphan. Take a look on temporal for details."
},
{
"message": ""
},
{
"message": "WARNINGS"
},
{
"message": "--------------"
},
{
"message": "WARNING: There is/are 1 junction(s) with exits upper intro"
},
{
"message": "SELECT * FROM anl_node WHERE fid=111 AND cur_user=current_user"
},
{
"message": ""
},
{
"message": "INFO"
},
{
"message": "-------"
},
{
"message": "INFO: No nodes with state > 0 AND state_type.is_operative on FALSE found."
},
{
"message": "INFO: No arcs with state > 0 AND state_type.is_operative on FALSE found."
},
{
"message": "INFO: No topologic features (arc, node) with state_type NULL values found."
},
{
"message": "INFO: No features missed on inp_tables found."
},
{
"message": "INFO: Any junction have been swiched on the fly to OUTFALL. Only junctions node sink with outfallparam values will be transformed on the fly to OUTFALL.0"
},
{
"message": "INFO: No nodes with null values on field elevation have been found."
},
{
"message": "INFO: No arcs with null values on field elevation have been found."
},
{
"message": "INFO: All mandatory colums for raingage (form_type, intvl, rgage_type) have been checked without any values missed."
},
{
"message": "INFO: All mandatory colums for 'TIMESERIES' raingage type have been checked without any values missed."
},
{
"message": "INFO: All mandatory colums (fname, sta, units) for 'FILE' raingage type have been checked without any values missed."
},
{
"message": ""
}
]
},
"point": {
"geometryType": "Point",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
419230.383,
4576436.11
]
},
"properties": {
"id": 100,
"fid": 107,
"state": null,
"expl_id": null,
"node_id": "233",
"descript": "Orphan node",
"nodecat_id": "R_MANHOLE_100"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
419270.082,
4576441.02
]
},
"properties": {
"id": 101,
"fid": 111,
"state": null,
"expl_id": null,
"node_id": "110",
"descript": "Node exit upper intro with: Max. entry: 34.770, Max. exit:36.940",
"nodecat_id": "R_MANHOLE_100"
}
}
]
},
"line": {
"geometryType": "LineString",
"features": {}
},
"polygon": {
"geometryType": "Polygon",
"features": {}
}
},
"returnManager": {
"style": {
"point": {
"style": "random",
"field": "fid",
"width": 2,
"transparency": 0.5
}
},
"line": {
"style": "random",
"field": "fid",
"width": 2,
"transparency": 0.5
},
"polygon": {
"style": "random",
"field": "fid",
"width": 2,
"transparency": 0.5
},
"functionId": 2431
}
}
}