gw_fct_psector_duplicate - Giswater/giswater_dbmodel GitHub Wiki
Description
Function that duplicates an existing planification sector and its features and saves it under a new name.
Input example
SELECT gw_fct_psector_duplicate($${
"client":{"device":4, "infoType":1, "lang":"ES"},
"form":{},"feature":{"type":"PSECTOR"},
"data":{"psector_id":"2","new_psector_name":"Masteplan2.0"}}$$);
Output example
{
"status": "Accepted",
"version": {
"value": "3.5.003"
},
"message": {
"level": 1,
"text": ""
},
"body": {
"data": {
"info": {
"geometryType": "",
"values": [
{
"id": 628,
"message": "DUPLICATE PSECTOR"
},
{
"id": 629,
"message": "------------------------------"
},
{
"id": 630,
"message": "Deactivate topology control for connecs and gullies."
},
{
"id": 631,
"message": "Copy psector 1 as Masteplan2.0."
},
{
"id": 632,
"message": "Set Masteplan2.0 as current psector."
},
{
"id": 633,
"message": "Copied arcs with state 0: 2085,2086"
},
{
"id": 634,
"message": "Copied nodes with state 0: 1076"
},
{
"id": 635,
"message": "Copied connecs with state 0: 3103,3104"
},
{
"id": 636,
"message": "New node inserted with state 1: 10761"
},
{
"id": 637,
"message": "New arc inserted with state 1: 20861,20851"
},
{
"id": 652,
"message": "New connec inserted with state 1: 114461,114462"
},
{
"id": 653,
"message": "Activate topology control."
}
]
}
},
"returnManager": {
"zoom": {
"margin": 20
}
}
}
}