ra2ce.network.hazard.hazard_intersect package#

Submodules#

ra2ce.network.hazard.hazard_intersect.hazard_intersect_builder_base module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class HazardIntersectBuilderBase(*args, **kwargs)[source]#

Bases: ABC, HazardIntersectBuilderProtocol

get_intersection(hazard_overlay)[source]#

Retrieves the resulting network from intersecting the hazard layer with a graph.

Return type:

GeoDataFrame | Graph

Parameters:

hazard_overlay (GeoDataFrame | Graph)

Args:

hazard_overlay (GeoDataFrame | Graph): Layer containing hazards.

Returns:

GeoDataFrame | Graph: Intersected graph with hazards.

ra2ce.network.hazard.hazard_intersect.hazard_intersect_builder_for_gpkg module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class HazardIntersectBuilderForGpkg(hazard_field_name='', hazard_aggregate_wl='', ra2ce_names=<factory>, hazard_gpkg_files=<factory>)[source]#

Bases: HazardIntersectBuilderBase

Parameters:
  • hazard_field_name (str)

  • hazard_aggregate_wl (str)

  • ra2ce_names (list[str])

  • hazard_gpkg_files (list[Path])

hazard_aggregate_wl: str = ''#
hazard_field_name: str = ''#
hazard_gpkg_files: list[Path]#
ra2ce_names: list[str]#

ra2ce.network.hazard.hazard_intersect.hazard_intersect_builder_for_table module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class HazardIntersectBuilderForTable(hazard_field_name='', network_file_id='', hazard_id='', ra2ce_name_key='RA2CE name')[source]#

Bases: HazardIntersectBuilderBase

Parameters:
  • hazard_field_name (str)

  • network_file_id (str)

  • hazard_id (str)

  • ra2ce_name_key (str)

hazard_field_name: str = ''#
hazard_id: str = ''#
network_file_id: str = ''#
ra2ce_name_key: str = 'RA2CE name'#

ra2ce.network.hazard.hazard_intersect.hazard_intersect_builder_for_tif module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class HazardIntersectBuilderForTif(hazard_aggregate_wl='', hazard_names=<factory>, ra2ce_names=<factory>, hazard_tif_files=<factory>)[source]#

Bases: HazardIntersectBuilderBase

Parameters:
  • hazard_aggregate_wl (str)

  • hazard_names (list[str])

  • ra2ce_names (list[str])

  • hazard_tif_files (list[Path])

hazard_aggregate_wl: str = ''#
hazard_names: list[str]#
hazard_tif_files: list[Path]#
ra2ce_names: list[str]#

ra2ce.network.hazard.hazard_intersect.hazard_intersect_builder_protocol module#

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class HazardIntersectBuilderProtocol(*args, **kwargs)[source]#

Bases: Protocol

get_intersection(hazard_overlay)[source]#

Retrieves the resulting network from intersecting the hazard layer with a graph.

Return type:

GeoDataFrame | Graph

Parameters:

hazard_overlay (GeoDataFrame | Graph)

Args:

hazard_overlay (GeoDataFrame | Graph): Layer containing hazards.

Returns:

GeoDataFrame | Graph: Intersected graph with hazards.

Module contents#