-
Notifications
You must be signed in to change notification settings - Fork 90
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
Disable resampling when plotting raster #273
Comments
You can use |
@tim-salabim thank you for the suggestion, I didn't know about the native.crs option, unfortunately it does not provide the cell on mouse hover, and the ngb method to doesn't provide the actual values. What I end up doing is a rasterToPolygon and then use mapview that way. I might just use a wrap around function. Is there a reason why it is difficult to find background maps in WGS 84? |
Because pretty much all tile providers provide tiles in webmercator as it is the de-facto default for webmapping. I still don't quite get the issue you have... If you plot polygons with mapview, they are also transformed to web mercator... Do you maybe have a reprex that shows what the issue is and why it doesn't work as you'd expect? |
The issue is that the raster values displayed by mapview(raster) are not the actual values in the raster, since they are interpolated. You can try this with any raster in lat/long, I can provide one if you'd like. The usefulness of mapview is also to explore data interactively, but if the displayed data is not the actual data it becomes less useful. When I convert a raster to polygon, when displayed the polygons contain the actual values. |
Ok, so there's likely no quick fix here. Unfortunately leaflet does not support raster plotting on |
this confirms my initial thought that there is no easy solution, for me the conversion to polygons seems a reasonable compromise. Thank you for this discussion. Should we close the issue? |
If you are fine your current workaround I guess we can close here. I've opened an issue here to keep the imageQuery for plainview objects open as I'd like to implement that at some stage. Thanks |
Thank you for the very nice package!
I have seen a similar question/issue #123 in which it is explained that any raster object is resampled to be reprojected.
I am wondering if there is anyway to turn the resampling off because it really reduced the usefulness of such great package. My rasters are usually in latlong and world coverage WGS84. Is there any way to plot the raster with mapview() without resampling? I guess I could convert the raster in a polygon but it is very useful to plot the raster along with other simple_features.
Many thanks
The text was updated successfully, but these errors were encountered: