The industrial exposure of several European countries is defined in the European Seismic Risk Model 2020 (ESRM20, or SERA model) on a 30-arcsec grid. The ESRM20/SERA files only provide points (lon, lat) in which buildings exist, not the full definition of the 30-arcscec grid. We need to define the polygons of the cells of which the given points are centroids in order to then treat them as the equivalent of "districts" for the industrial case.
This merge request is the second of several that aim at implementing this feature. The following is included in this second merge request:
- Added three functions to
create_dict_all_coordinates(): create a dictionary with all coordinates of the corners of the cells, to be used as input for
create_dict_unique_coordinates(): create a dictionary with unique values of the coordinates of the corners of the cells, to a certain precision (given by the output of
adjust_coords(): adjust all the coordinates of the corners of the cells by taking the average value of all instances of that coordinate that "should be the same", as identified by
- Added tests to those three functions to
This feature is associated with https://git.gfz-potsdam.de/dynamicexposure/collaboration/-/issues/40
Previous merger request: !11 (merged)
Note: print statements are used to indicate errors/problems as a full logger functionality is not yet part of the prototype code (quite a manual logging system is set up in some core scripts, though; a full logger functionality will probably not be incorporated to the prototype code but go directly in the refactoring).