Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gde_calculations_prototype
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 7
    • Issues 7
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynamic ExposureDynamic Exposure
  • LegacyLegacy
  • gde_calculations_prototype
  • Merge requests
  • !11

Added initial functions to create cells around SERA industrial points

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Cecilia Nievas requested to merge feature/ind01 into master Feb 24, 2021
  • Overview 56
  • Commits 1
  • Pipelines 0
  • Changes 4

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 first of several that aim at implementing this feature. The following is included in this first merge request:

  • Added GDE_TOOLS_create_industrial_cells.py with four initial functions:

    • define_corners(): define the four corners of the cell, given the centroid
    • define_cell_polygon(): create a Shapely polygon of the cell using the four corners
    • retrieve_unique_points(): determine the unique points (lon, lat) that exist in an input Pandas DataFrame (which will contain the SERA input model, in which the same points repeat themselves for different building classes), according to a defined precision
    • define_cells_in_dataframe(): define cell geometries around input centroids given in a Pandas DataFrame of unique points (the output of retrieve_unique_points()), by calling define_corners() and define_cell_polygon()
  • Added test_GDE_TOOLS_create_industrial_cells.py with tests for all those functions, except for define_cell_polygon() as it just defines a polygon using Shapely (i.e. we'd be testing Shapely, not our code).

This feature is associated with https://git.gfz-potsdam.de/dynamicexposure/collaboration/-/issues/40

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).

\approve @fd @ds

\fyi @tara @shinde

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature/ind01