HRDatabase
HRDatabase(self, database_path)HRDatabase class
Attributes
| Name | Type | Description | 
|---|---|---|
| watersystem, WaterSystem | Water system of the dike trajectory | |
| locations, list | List with all locations in the database | 
Methods
| Name | Description | 
|---|---|
| check_location | Check if a hrdlocation exists within the database | 
| create_location | Creates a location based upon the Settings object | 
| get_location | Returns the Location class of a hrdlocation. | 
| get_location_names | Return a list of all hrdlocations in the database | 
| get_settings | Returns the Settings class of a hrdlocation | 
| get_water_system | A method that returns the water system corresponding to the trajectory. | 
check_location
HRDatabase.check_location(hrdlocation)Check if a hrdlocation exists within the database
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
| hrdlocation | str | The hrdlocation (uitvoerpunt) | required | 
Returns
| Name | Type | Description | 
|---|---|---|
| bool | Whether the hrdlocation is in the database | 
create_location
HRDatabase.create_location(settings)Creates a location based upon the Settings object
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
| settings | Settings | The Settings object of a location | required | 
Returns
| Name | Type | Description | 
|---|---|---|
| Location | The Location object for the given settings | 
get_location
HRDatabase.get_location(hrdlocation)Returns the Location class of a hrdlocation. Uses the default set of parameters.
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
| hrdlocation | str | The hrdlocation (uitvoerpunt) | required | 
Returns
| Name | Type | Description | 
|---|---|---|
| Location | The Location object for the hrdlocation | 
get_location_names
HRDatabase.get_location_names()Return a list of all hrdlocations in the database
Returns
| Name | Type | Description | 
|---|---|---|
| list[str] | List with all hrdlocation names | 
get_settings
HRDatabase.get_settings(hrdlocation)Returns the Settings class of a hrdlocation Useful for when you manually want to adjust the settings To create a location using the settings use the function ‘create_location(settings)’
Parameters
| Name | Type | Description | Default | 
|---|---|---|---|
| hrdlocation | str | The hrdlocation (uitvoerpunt) | required | 
Returns
| Name | Type | Description | 
|---|---|---|
| Settings | The Settings object for the hrdlocation | 
get_water_system
HRDatabase.get_water_system()A method that returns the water system corresponding to the trajectory.
Returns
| Name | Type | Description | 
|---|---|---|
| WaterSystem | Water system of the trajectory |