Update HydroID with Seed
Description
Given a workspace, update the HYDROID, and Related IDs [e.g., FeatureID, StreamID, DrainID, NextdownID, RiverID etc] with a specified Seed value, e.g., Seed=10000000. The layer and the fields are specified by an configuration json file (optional). The content of json file looks like this:
{
"layers": [
{
"layer":"fpzoneriver",
"fields":[
"StreamID"
]
},
{
"layer":"fpriver",
"fields":[
"HydroID",
"DrainID",
"NextDownID",
"SplitID",
"GRIDID"
]
},
{
"layer":"fpcatchment",
"fields":[
"HydroID",
"NextDownID",
"StreamID",
"GRIDID"
]
},
{
"layer":"pf_ModelStream",
"fields":[
"StreamID",
"RiverID",
"GridID"
]
},
{
"layer":"TSXRef",
"fields":[
"FeatureID",
"KeyTo"
]
}
]
}
If the optional config json file is not provided, a default json_string is provided in the code.
Usage
Parameters
Parameter Name | Type | Direction | Data Type | Dialog Reference |
---|---|---|---|---|
Input Geodatabase | Required | Input | Workspace | Geodatabase |
HydroID Seed | Required | Input | Long | HydroID Seed, e.g., 1000000, The HydroID Seed value will be added to HydroID and RelatedID fields. |
Config Json File | Optional | Input | Text File | Configuration Json file. If not provided, the following default json_string will be used:
|
Backup Layer Suffix | Optional | Input | String | Backup_Layer_Suffix = a layer will be copied to create a backup layer, with layername=layername+"_"+Backup_Layer_Suffix before its IDs are updated,When Backup_Layer_Suffix= "", (Blank), Not backup copy of the layers will be created. |