I have a huge dataset of raster in PostGIS. Each scene is divided into tiles (tile-size 500x500). I was trying to
SELECT rast FROM landsat8 WHERE ST_Intersects(rast, polygon). It runs very slow, because it returns longitudinal scenes of raster. Where I just want one day's scene.
But the problem is if I query with fixed date, adjacent scene with different date won't be selected. That's not true.
So I think about some solutions:
- Because Landsat 8 re-visiting every 16 days, so I will insert every 16 days into different table. So I can query from raster that cover all the earth without duplicate.
- I'm not sure about ST_Within(), ST_DWithin() then SELECT rast that doesn't overlap other >50%
What would you do in this situation?