Skip to content

CRS mismatch when clipping WDPA polygons if shapes are not in 4326 #19

Description

@irm-codebase

Describe the bug

Assume an input shapes file is in EPSG:3035 (common for Europe).
Running: snakemake -c 2 resources/area_potentials/results/national/area_potential_wind_onshore.tif

fails in clip_and_rasterise_polys.py with:

Protected areas: 307019
Protected areas after applying total_bounds: 0
rioxarray.exceptions.NoDataInBounds: No data found in bounds.

The cause is that there is no reprojection to the target raster / polygons beforehand.

Steps to reproduce
Steps to reproduce the behavior:

  1. Use any input shape file not in 4326

Expected behavior

Reproject geometries to the shapes/reference-raster CRS first before clipping.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Linux Fedora 44
  • Version: 1.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions