Giter Club home page Giter Club logo

Comments (9)

snowman2 avatar snowman2 commented on May 28, 2024 1

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.

snowman2 avatar snowman2 commented on May 28, 2024

It seems GEE uses clip. Maybe crop could be an ailias for clip?

from rioxarray.

djhoese avatar djhoese commented on May 28, 2024

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.

djhoese avatar djhoese commented on May 28, 2024

Ok just asked @dopplershift and his thought was:

  1. if you don't have the data already then it would be subsetting
  2. if you have the data and want to get a smaller chunk of data then it is cropping (manipulating data)
  3. if you are drawing the data and only want to draw part of it then that is clipping

from rioxarray.

snowman2 avatar snowman2 commented on May 28, 2024

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?

from rioxarray.

djhoese avatar djhoese commented on May 28, 2024

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.

snowman2 avatar snowman2 commented on May 28, 2024

Random side note, just saw this: https://gis.stackexchange.com/questions/328128/extract-data-within-a-geometry-shape

from rioxarray.

snowman2 avatar snowman2 commented on May 28, 2024

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.

snowman2 avatar snowman2 commented on May 28, 2024

Closing for now. If you have some other thoughts on the subject, feel free to continue.

from rioxarray.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.