Skip to content
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

GeometryOps and Rasters mean different things by touches #6

Open
asinghvi17 opened this issue Jan 8, 2025 · 4 comments
Open

GeometryOps and Rasters mean different things by touches #6

asinghvi17 opened this issue Jan 8, 2025 · 4 comments

Comments

@asinghvi17
Copy link
Member

GeometryOps touches means only boundary, Rasters Touches means GeometryOps intersects

@evetion
Copy link
Member

evetion commented Jan 8, 2025

Ops is correct here, although I'm not 100% what touches mean in terms of raster interaction? That's not in DE-9IM.

@rafaqz
Copy link
Member

rafaqz commented Jan 8, 2025

It comes from gdal and R use in rasterize etc where it means to include the pixels that touch the boundary as well as the other pixels, not exclusive of them.

@evetion
Copy link
Member

evetion commented Feb 13, 2025

But there's no exported function touches in Rasters right? Just a kwarg.

:boundary: for polygons, include pixels where the :center is inside the polygon, where the polygon :touches the pixel, or that are completely :inside the polygon. The default is :center.

I don't see this as a problem, but if you do, we could deprecate the kwargs for better names used in Ops? :touches becomes :intersects, and :inside becomes :within? :center could be :centroid if we're changing names anyway.

PS. You could change this behavior depending on whether a pixel is a point (:center) or area (:touches or :inside)?

@asinghvi17
Copy link
Member Author

There's a Touches selector, which is the main concern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants