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

add function read_raster_runif #136

Merged
merged 10 commits into from
May 12, 2021
Merged

add function read_raster_runif #136

merged 10 commits into from
May 12, 2021

Conversation

ToonHub
Copy link
Contributor

@ToonHub ToonHub commented May 11, 2021

I added the function read_raster_runif.

@ToonHub ToonHub requested a review from florisvdh May 11, 2021 09:44
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.

Thanks for preparing the function @ToonHub! Nice work.

I propose some small updates in PR #138, where I suggest to drop suppressWarnings() because those warnings are not irrelevant to the user (a proj4string for EPSG:31370 is included in the returned object but it is degraded and should not be used). Instead, a package startup message has been created to give some advice. The rgdal warnings are expected to go away in the future.

read_raster_runif(): updates
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.

👍

Fixes #134.

@florisvdh
Copy link
Member

Any comments on my proposed pkg startup message? @ToonHub @cecileherr or others?

> library(n2khab)
Attaching n2khab version 0.4.0.9000.

When working with raster objects returned by n2khab, you can safely
mute proj4string degradation warnings:

options(rgdal_show_exportToProj4_warnings = "none")

You must do this before using the n2khab functions depending on 
rgdal or raster, and before loading the latter (or sp).

Do note that those warnings are applicable: the generated proj4string
of 'EPSG:31370' objects is effectively degraded and should not be used.
See https://inbo.github.io/n2khab/#suppressing-rgdal-warnings-about-proj4string-degradation
for more information.

@florisvdh florisvdh linked an issue May 11, 2021 that may be closed by this pull request
@florisvdh florisvdh removed a link to an issue May 11, 2021
@ToonHub
Copy link
Contributor Author

ToonHub commented May 11, 2021

Good idea to mention this.

the generated proj4string of 'EPSG:31370' objects is effectively degraded and should not be used.

Is the sentence above correct? I do not really understand what you mean.

@florisvdh
Copy link
Member

Is the sentence above correct?

Your question is reason enough to improve it 😉.

Suggestion:

Do note that those warnings are applicable: the proj4string in the
returned raster objects is effectively degraded and should not be used.

Is this more clear? 'is degraded' refers to 'the proj4string'

@florisvdh
Copy link
Member

Or:

Do note that those warnings are applicable: in the returned raster
objects, the proj4string is effectively degraded and should not be used.

@ToonHub
Copy link
Contributor Author

ToonHub commented May 11, 2021

OK. It is more clear now.

@florisvdh
Copy link
Member

I'll add an updated message here, thanks.

@ToonHub I also suggest not to include the version and directory specific reference to the n2khab-preprocessing repo. It is done at Zenodo, but there it is for specific data source versions. Here I'd strive to minimal future maintenance of documentation (version independence, directory independence). I'll update according to the approach in other functions.

@florisvdh florisvdh merged commit 3c4bb1a into dev_0.5.0 May 12, 2021
@florisvdh florisvdh deleted the read_raster_runif branch May 12, 2021 06:34
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