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

Introducing an option for the user to decide on simplifying GADM shapes #1138

Merged
merged 14 commits into from
Dec 20, 2024

Conversation

SermishaNarayana
Copy link
Contributor

@SermishaNarayana SermishaNarayana commented Oct 10, 2024

Closes # (if applicable).

Changes proposed in this Pull Request

Checklist

  • I consent to the release of this PR's code under the AGPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0.
  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and doc/requirements.txt.
  • Changes in configuration options are added in all of config.default.yaml and config.tutorial.yaml.
  • Add a test config or line additions to test/ (note tests are changing the config.tutorial.yaml)
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@SermishaNarayana
Copy link
Contributor Author

Screenshot 2024-10-10 at 6 03 39 PM
@ekatef Here, I have plotted the difference in the shape files with and without simplifying the GADM shapes for the US. The differences lie mostly in the consideration of some small islanded lands and in the borders of the US states

Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

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

Great contribution :D added a comment, please also add a release note.
We are very close I believe :D

config.default.yaml Outdated Show resolved Hide resolved
@SermishaNarayana SermishaNarayana marked this pull request as ready for review October 17, 2024 10:22
Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

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

Hello @SermishaNarayana :)
Thank for the contribution and the PR is ready to merge.

Unfortunately git history is not the best; for future PRs, it is a great idea if you update your main and clean it.

Moreover, please fix merge conflicts into the README; I see the documenter is leading to some weird effects to be fixed in the future.

@@ -106,6 +106,7 @@ cluster_options:

build_shape_options:
gadm_layer_id: 1 # GADM level area used for the gadm_shapes. Codes are country-dependent but roughly: 0: country, 1: region/county-like, 2: municipality-like
simplify_gadm: false # When true, shape polygons are simplified else no
Copy link
Member

Choose a reason for hiding this comment

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

By default, let's enable the simplification. This on average speeds up computation and is desirable

@davide-f
Copy link
Member

Hello @SermishaNarayana :D
Just commentng to check your expectations on this PR. If you wish I can cherry-pick this and finalize or feel free to resolve the comments above and we can finalize :)

@SermishaNarayana
Copy link
Contributor Author

SermishaNarayana commented Dec 20, 2024

Hello @SermishaNarayana :D Just commentng to check your expectations on this PR. If you wish I can cherry-pick this and finalize or feel free to resolve the comments above and we can finalize :)

Hi @davide-f ! Apologies, I somehow missed the comment on the merge conflicts with READme earlier. I have resolved it now.

@davide-f
Copy link
Member

Thanks! @SermishaNarayana :D merging

@davide-f davide-f merged commit 302f45a into pypsa-meets-earth:main Dec 20, 2024
4 of 5 checks passed
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.

4 participants