You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the great library - it is really easy to work with.
I have a specific use case for analysing Sentinel 2 stacks, which are already rectified and referenced to a consistent grid across scenes. Is it possible to use odc stac to return the data where the coordinates for each pixel, across each band are the same as the source files?
Currently I am using bbox, but I am not sure if resampling is taking place.
Thanks
The text was updated successfully, but these errors were encountered:
The most precise mechanism for controlling output pixel grid is to use GeoBox, supplied via geobox= parameter to odc.stac.load(.., geobox=..).
If your STAC metadata contains necessary elements^^ AND all STAC items share "common pixel grid"**, odc-stac will default to loading pixels with the native grid and not resampling. In the general case "native load" is of course not possible, say when region spans UTM zones and you have S2 granules in different projections.
^^ basically Projection Extension Information, see STAC best practices
** common pixel grid means: same CRS, same resolution, same "grid anchor". For Sentinel 2 "grid anchor" is "pixel edge aligns to x=0, y=0lines when extending grid all the way to the origin, which is also default anchor inodc.stac.load` when generating.
So you might be already loading data in non-resampled way, since supplying bbox= applies this "pixel snapping", I still don't have a document to point people to for explaining exact pixel grid behaviours 😮💨
You can construct GeoBox from bounding box using odc.geo.geobox.GeoBox.from_bbox, CRS and resolution is kinda obvious, anchor= is what you need to understand to create an appropriate GeoBox for your data, usually it's "edge aligns to X/Y axis" (Sentinel 2), other common one is "center aligns to X/Y axis" (Landsat, climate data often uses that too). And if you have other data already loaded you can just query the geobox of that data with xx.odc.geobox, and then use that directly or construct "compatible GeoBox" with GeoBox.enclosing method.
Hi, thanks for the great library - it is really easy to work with.
I have a specific use case for analysing Sentinel 2 stacks, which are already rectified and referenced to a consistent grid across scenes. Is it possible to use odc stac to return the data where the coordinates for each pixel, across each band are the same as the source files?
Currently I am using bbox, but I am not sure if resampling is taking place.
Thanks
The text was updated successfully, but these errors were encountered: