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

Use RangeExtractor.jl for for lazy application over DiskArrays.jl chunks #871

Open
rafaqz opened this issue Jan 23, 2025 · 7 comments
Open

Comments

@rafaqz
Copy link
Owner

rafaqz commented Jan 23, 2025

It would be good to be able to group points by the DiskArrays.jl chunks they map to in a Raster.

Polygons and lines could cover multiple points - its essentially a rasterization into a very coarse raster where indices are pushed to a vector for each chunk.

This would be pretty useful in e.g. optomising extract or zonal statistics from a lazy raster or stack.

@asinghvi17 I guess this is a bit like your RangeExtractor.jl?

@asinghvi17
Copy link
Collaborator

This is exactly RangeExtractor.jl :)

@rafaqz
Copy link
Owner Author

rafaqz commented Jan 23, 2025

But its not DiskArrays.jl aware?

@rafaqz
Copy link
Owner Author

rafaqz commented Jan 23, 2025

I'm thinking to build it into Rasters.jl to use inside e.g. extract. We would need to move the extension code to Rasters

@asinghvi17
Copy link
Collaborator

Yeah, you just need to specify the chunks according to what diskarrays tells you

@asinghvi17
Copy link
Collaborator

An implementation would be similar to the Rasters extension I have in RangeExtractor

@rafaqz
Copy link
Owner Author

rafaqz commented Jan 23, 2025

Ok lets depend on RangeExtractor.jl in Rasters. I'm keen to make all the spatial methods faster on lazy data

@rafaqz rafaqz changed the title Chunk mapping of geometries Use RangeExtractor.jl for for lazy application over DiskArrays.jl chunks Jan 23, 2025
@asinghvi17
Copy link
Collaborator

Sweet! I'll finalize the API over the next few days so we can also discard unnecessary tiles for polygons. Since the polygon burning is done by scanline this should be really efficient if we just use rasterize, so maybe that is the thing we need to do...

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

2 participants