Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix exclusion for non overlapping geometries #289

Merged
merged 5 commits into from
May 2, 2023

Conversation

FabianHofmann
Copy link
Contributor

@FabianHofmann FabianHofmann commented Apr 28, 2023

and add convenience functions to ExclusionContainer class

Change proposed in this Pull Request

In recent eligibility calculations in pypsa-eur we saw bugs coming up, when the raster and the geometries are not overlapping. This changes fix this issue.

Additionally this change introduces two new functions to the ExclusionContainer class that ease the inspection of excluded areas in a geometry.

The example notebook for show-casing the land-use calculation was update to show the new functions.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I tested my contribution locally and it seems to work fine.
  • I locally ran pytest inside the repository and no unexpected problems came up.
  • I have adjusted the docstrings in the code appropriately.
  • I have documented the effects of my code changes in the documentation doc/.
  • I have added newly introduced dependencies to environment.yaml file.
  • I have added a note to release notes doc/release_notes.rst.
  • I have used pre-commit run --all to lint/format/check my contribution

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Patch coverage: 81.57% and project coverage change: +0.05 🎉

Comparison is base (7fe57a3) 72.74% compared to head (f4fa4b5) 72.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #289      +/-   ##
==========================================
+ Coverage   72.74%   72.80%   +0.05%     
==========================================
  Files          19       19              
  Lines        1596     1625      +29     
  Branches      270      277       +7     
==========================================
+ Hits         1161     1183      +22     
- Misses        363      366       +3     
- Partials       72       76       +4     
Impacted Files Coverage Δ
atlite/gis.py 88.42% <81.57%> (-1.43%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new functions!

@FabianHofmann FabianHofmann merged commit 321b7f4 into master May 2, 2023
2 of 3 checks passed
@euronion
Copy link
Collaborator

euronion commented May 2, 2023

Nice. Did you intentionally remove Macedonia North Macedonia from all examples and plots?

@FabianHofmann
Copy link
Contributor Author

Nice. Did you intentionally remove Macedonia North Macedonia from all examples and plots?

Not really, was there a renaming? It is still in the list of selected countries...

@euronion
Copy link
Collaborator

euronion commented May 2, 2023

Yes, the country was officially renamed in 2019. Probably the name change took some time to propagate to the datasets.

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.

None yet

3 participants