Closed snowman2 closed 5 years ago
It seems GEE uses clip. Maybe crop
could be an ailias for clip?
What is GEE? Google Earth Engine? If you are going that route then what about numpy's clip
which does something different...kind of?
Ok just asked @dopplershift and his thought was:
I did a google search with crop raster
and I had a mix of crop
and clip
show up. In QGIS & ArcGIS, they seem to like clip
though:
With clip in the rio
namespace, I am thinking it shouldn't conflict with the xarray version of clip.
xds = xarray.open_rasterio("???")
xds.clip(...)
xds.rio.clip(...)
Thoughts?
So the only thing I keep thinking is that all the tools you are talking about that use clipping are also visualizing the data. rioxarray isn't visualizing necessarily. I did some googling of "crop versus clip" and one thing that popped up was photoshop which uses crop as "anything outside this shape is removed" and clip as "anything outside this shape is hidden". Since rioxarray is returning a new object I'm not sure what the best name is for that, especially since it is likely a "view" of the original data.
Clip is fine.
Random side note, just saw this: https://gis.stackexchange.com/questions/328128/extract-data-within-a-geometry-shape
Also, based on this issue: https://github.com/pydata/xarray/issues/501, I am wondering if there should be an argument or something that only masks the data instead of dropping the outer regions. This is probably what you mean by the difference between clip
and crop
. However, with others being used to clip
, I am concerned it would cause confusion in the transition between GEE, ArcGIS, and QGIS to rioxarray
.
Closing for now. If you have some other thoughts on the subject, feel free to continue.
Just had a chuckle after remembering this discussion and connecting that corteva is an agricultural company ... crop
should have been the obvious choice 😂
crop
is probably the better name for clipping/cropping rasters.