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

generate_watersurfaces_hab: update to v2020 #54

Merged
merged 11 commits into from
May 12, 2021

Conversation

cecileherr
Copy link
Collaborator

Main changes:

  • add a control of the file hashes for the input maps (habitatmap_stdized and watersurfaces) based on n2khab::checksum (be sure to use version 2020 and watersurfaces v1.1)
  • replace sessioninfo by renv
  • add a timestamp (OGR_CURRENT_DATE) to create a geoPackage with reproducible file hash
  • add basic checks for the new version of the GeoPackage watersurfaces_hab
  • explore errors in geometry and correct them

Here is the rendered notebook:
generating_watersurfaces_hab_rendered_nb.zip

And the new version of watersurfaces_hab:
watersurfaces_hab_2020_gpkg.zip

@cecileherr cecileherr requested a review from florisvdh March 29, 2021 13:53
Copy link
Member

@florisvdh florisvdh left a comment

Choose a reason for hiding this comment

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

Excellent work @cecileherr 🎉! You pay attention to various relevant aspects, which is much appreciated.

Interesting to see how you fixed geometries. It seems worth doing that for other habitatmap-derived data sources (see specific comment).

It seems best to update the document title to 'Generating watersurfaces_hab', for consistency with other ones.

I believe the specific comments are just aesthetic or informative and will not affect the actual result (if re-run, the checksum should still be the same).

I checked the xxhsums of the input files, they're fine.

Thanks for attaching the html and data source file (file to be overwritten on the Q-drive as well, where we just save the latest versions).

"Error in CPL_geos_op2(op, x, y) :
Evaluation error: TopologyException: Input geom 1 is invalid: Ring Self-intersection at or near point 78082.684000000358 228483.7210999988 at 78082.684000000358 228483.7210999988.".

We solve the problem based on this [article: Tidying feature geometries with sf](https://www.r-spatial.org/r/2017/03/19/invalid.html).
Copy link
Member

Choose a reason for hiding this comment

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

👍

src/generate_watersurfaces_hab/20_check_result.Rmd Outdated Show resolved Hide resolved
src/generate_watersurfaces_hab/20_check_result.Rmd Outdated Show resolved Hide resolved
src/generate_watersurfaces_hab/20_check_result.Rmd Outdated Show resolved Hide resolved
src/generate_watersurfaces_hab/20_check_result.Rmd Outdated Show resolved Hide resolved
src/generate_watersurfaces_hab/20_check_result.Rmd Outdated Show resolved Hide resolved
@cecileherr
Copy link
Collaborator Author

I believe the specific comments are just aesthetic or informative and will not affect the actual result (if re-run, the checksum should still be the same).

Indeed, I re-ran the script and the checksum stay the same.

Thanks for attaching the html and data source file (file to be overwritten on the Q-drive as well, where we just save the latest versions).

@florisvdh: shall I put the file on the Q-drive or do you prefer to do it yourself?

@cecileherr
Copy link
Collaborator Author

I updated the script to implement your suggestions.

Here is the new version of the rendered notebook (quite big due to the maps):
generating_watersurfaces_hab_rendered_nb.zip

@florisvdh
Copy link
Member

shall I put the file on the Q-drive or do you prefer to do it yourself?

You're welcome to do so @cecileherr - thanks.

I'll have a look at your update tomorrow.

Copy link
Member

@florisvdh florisvdh left a comment

Choose a reason for hiding this comment

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

Nice work @cecileherr, thanks. The maps are an attractive approach to explore differences.

You can leave this PR open, just like PR #50, until dependent work in n2khab is finished. So you can add further stuff here as needed.

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.

2 participants