Skip to content

Handling lines & polygons as exposures for impact calcs#351

Merged
emanuel-schmid merged 184 commits intodevelopfrom
feature/lines_polygons_exp
Jun 28, 2022
Merged

Handling lines & polygons as exposures for impact calcs#351
emanuel-schmid merged 184 commits intodevelopfrom
feature/lines_polygons_exp

Conversation

@chahank
Copy link
Member

@chahank chahank commented Jan 20, 2022

This pull request is to discuss the updates of the util functions to handle lines and polygons. This is a follow-up of #221.

It is now possible to compute directly the impact for exposures with polygons and/or lines geometries. There are methods to disaggregate polygons/lines to points, with wrappers for geodataframes and exposures. There are methods to aggregate the impact per point to geometries.

The final outcome is an Impact object, which has one new attribute containing the geometries of the original exposure. This allows plotting the impact per geometry with a new method.

This pull request also contains some of the methods proposed in #350. The methods here are in the util.lines_polygon_handler module. This is because they were first made for use in this module only. If #350 is succesful, the code can then be adapted easily.

Evelyn-M and others added 30 commits April 21, 2021 15:08
@chahank
Copy link
Member Author

chahank commented Jun 22, 2022

So I'm loading the exp_poly as indicated in the beginning of the test script. However, suddenly it tells me that base is not an allowed exp type, only litpop and crop-sth. Hence I cannot load it anymore at all. Not sure why; re-starting a few times might help ^^

For me it now works (the correct file gets downloaded). Thus, all the tests seem to be working fine. Let's see what the jenkins build will tell.

@chahank
Copy link
Member Author

chahank commented Jun 22, 2022

It seems that the data API Client doesn't return me the exp_poly properly from which the gdf_poly is derived (it stopped working altogether now). So all the values in this test need to be adjusted accordingly by someone who can load the current gdf / exp.

For me locally it works all good for now.

@emanuel-schmid emanuel-schmid merged commit a4a4c8f into develop Jun 28, 2022
@emanuel-schmid emanuel-schmid deleted the feature/lines_polygons_exp branch June 28, 2022 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants