Closed amit-hazan closed 3 weeks ago
The intersects
will always consider the geometry
of the STAC item. Your point should be inside (or at least intersecting) with the item's geometry, otherwise there's a bug on the server side (pgstac in the Planetary Computer's case).
The geometry of the Item should be close to the geometry of the raster assets, but it might not be perfect. https://www.element84.com/geospatial/the-stactools-raster-footprint-utility goes into this.
Depending on the item / assets, there might be some bad metadata that should be addressed in the service serving these items (or the stactools package). Either way, I don't think this is an issue in pystac-client.
It seems that the raster footprint was the problem since it's inaccurate. Thanks for your help!
I frequently perform operations to search for items that intersect with a given point. Generally, this approach works well, and I get the correct item. However, I have noticed that, in some cases, the point does not seem to intersect with the resulting item as expected. Here is a code snippet that demonstrates the issue:
One of the resulting items is 'S2A_MSIL2A_20200915T101031_R022_T33VWG_20200918T101504'. However, when I download one of its assets (a band) and attempt to locate the point on the raster, the point appears to be outside of the raster bounds.
Any insights into why this might be happening or how to resolve this would be greatly appreciated.