-
Notifications
You must be signed in to change notification settings - Fork 51
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
projectRaster
projections seem to be wrong (maybe related to PROJ6 ?)
#161
Comments
This issue, and your post on SO are interesting and useful, but a bit difficult to respond to, as they cover a number of different things. I will try to respond to some of them. For now: transforming a raster will lead to different values. That is expected, and thus that is a bad approach when extracting values with "vector" data. This does not mean that the values you get are right or wrong. But the fact that they are different does not mean they are wrong. Again, that is expected. Stars is different. It appears that |
OK thanks for the explanation. I have very little experience with |
Projecting a raster to a new (rectangular) raster requires estimation of the new cell values based on the overlap of the original cell values. The difference is Illustrated here:
|
It seems that
projectRaster
fails to reproject properly when provided a proj4 string or an sp CRS object.Possibly related to the changes involved in PROJ6 and discarded datum in proj4 string ? #78
Example from this SO exchange : https://stackoverflow.com/a/63812649/2417437
Reprojecting the points towards the raster crs seems to work
Reprojecting the raster towards the crs of the points seem to create a new raster with the wrong crs
Extract provides a different answer that seems to be incorrect.
With
stars
we obtain the same answer as when we reproject the points toward the crs of the rasterThe text was updated successfully, but these errors were encountered: