Comments (9)
Just had a chuckle after remembering this discussion and connecting that corteva is an agricultural company ... crop
should have been the obvious choice 😂
from rioxarray.
It seems GEE uses clip. Maybe crop
could be an ailias for clip?
from rioxarray.
What is GEE? Google Earth Engine? If you are going that route then what about numpy's clip
which does something different...kind of?
from rioxarray.
Ok just asked @dopplershift and his thought was:
- if you don't have the data already then it would be subsetting
- if you have the data and want to get a smaller chunk of data then it is cropping (manipulating data)
- if you are drawing the data and only want to draw part of it then that is clipping
from rioxarray.
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:
- https://www.esri.com/arcgis-blog/products/product/analytics/clipping-an-image-or-raster-in-arcgis/
- https://pro.arcgis.com/en/pro-app/tool-reference/data-management/clip.htm
- http://www.qgistutorials.com/en/docs/3/raster_mosaicing_and_clipping.html
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?
from rioxarray.
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.
from rioxarray.
Random side note, just saw this: https://gis.stackexchange.com/questions/328128/extract-data-within-a-geometry-shape
from rioxarray.
Also, based on this issue: pydata/xarray#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
.
from rioxarray.
Closing for now. If you have some other thoughts on the subject, feel free to continue.
from rioxarray.
Related Issues (20)
- rioxarray.open_rasterio(file) doesn't work HOT 1
- Support GCPs without known z coordinate HOT 3
- `spatial_ref` coordinate not accessible after saving dataset HOT 2
- Add a rio.fill.fillnodata-based nodata interpolation in addition to existing scipy-based HOT 1
- write somewhere in the documentation that extentions are not respecting F401
- Rename bands as variables using long_name attribute HOT 8
- typo in docs
- `rio.transform()` does not retrieve exact transform stored in `rio.write_transform()` HOT 2
- Document difference between `set_crs` and `write_crs` HOT 4
- Typo in docs: longitute
- Fail to reproject and reproject_match a dataset with rotation affine. HOT 3
- reproject_match renames dims HOT 2
- Xarray padding with mode='reflect'
- Padding and Croping doesn't end up same result HOT 2
- overview_level failing in xarray with engine='rasterio' due to missing doc? HOT 2
- Rio array merge missing HOT 3
- Delayed/chunked opening (sentinel) SAFE data with bands as variables fails HOT 1
- `reproject_match` raises `MissingSpatialDimensionError` with spatial dims set HOT 1
- Save larger raster with zstd compression writes dirty block HOT 3
- Memory leak when looping through data variables of a dataset loaded from a VRT HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rioxarray.