-
Notifications
You must be signed in to change notification settings - Fork 184
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 - layer_id not resetting after each loop #663
fix - layer_id not resetting after each loop #663
Conversation
Great PR and description. Looks like a nice bug that you catched @GridGrapher. Changes look good to me. Since @davide-f currently plays more around with the global stability, I will leave the approval to him. |
Thanks @GridGrapher , that's a very nice catch! I see that for gadm layer level 10, the shapes of some countries collapse to level 0, rather, we would like to have the maximum of each level. |
This PR could be merged as-is; however, it would conflict with the history of the PR to revise add_population_data as this commit is different from the one of the other PR. To avoid duplication, you may reset this PR to the main and do a cherry-pick on this PR git reset --hard b5a214c ad38dae should be the commit of the other add population PR and by doing this the two wouldn't be conflicting once merged |
3859b62
to
9031250
Compare
The adjustment makes a lot of sense to avoid merge conflicts, I've implemented the commands and it should now be correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @GridGrapher . This will be merged after the tests are passing :)
Not sure why but it doesn't seems the right commit has been stored, @pz-max the code is ok, if the commit does not match a duplicate commit appears and maybe few merge conflicts |
The code I'm using in the other branch includes |
@GridGrapher yep, pyogrio needs to be removed. I am fine by dealing with the merge conflicts locally and think this can be merged. @davide-f has the last word/ will merge |
9031250
to
150f5d0
Compare
I reset to without pyogrio, it should be straight forward to merge this into the other branch once this is on main, so I'll leave it up to @davide-f for the course of action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to go and approved also by @davide-f
Closes # (if applicable).
Changes proposed in this Pull Request
When running
build_shapes
for['earth']
there were inconsistencies in thegadm_layer_id
of countries, see below:gadm_layer_id = 1
gadm_layer_id = 10
By going through the code it seems layer_id wasn't being set to the global
gdam_layer_id
inget_GADM_layer
.This would result in layer_id being set to 0 once countries such as 'NU' were reached, then all following countries would use 0 instead of the original
gadm_layer_id
.Checklist
envs/environment.yaml
andenvs/environment.docs.yaml
.config.default.yaml
andconfig.tutorial.yaml
.test/
(note tests are changing the config.tutorial.yaml)doc/configtables/*.csv
and line references are adjusted indoc/configuration.rst
anddoc/tutorial.rst
.doc/release_notes.rst
is amended in the format of previous release notes, including reference to the requested PR.