<div dir="ltr"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
Hi PostGIS Users,</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
I have a huge dataset of raster in PostGIS. Each scene is divided into tiles (tile-size 500x500). I was trying to <code style="margin:0px;padding:1px 5px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;color:rgb(34,34,34);background-color:rgb(238,238,238);white-space:pre-wrap">SELECT rast FROM landsat8 WHERE ST_Intersects(rast, polygon)</code>. It runs very slow, because it returns longitudinal scenes of raster. Where I just want one day's scene.<br>
But the problem is if I query with fixed date, adjacent scene with different date won't be selected. That's not true.<br>So I think about some solutions:</p><ul style="margin:0px 0px 1em 30px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;list-style-position:initial;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
<li style="margin:0px 0px 7px;padding:0px;border:0px;vertical-align:baseline;line-height:16px;word-wrap:break-word">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.</li>
<li style="margin:0px 0px 7px;padding:0px;border:0px;vertical-align:baseline;line-height:16px;word-wrap:break-word">I'm not sure about ST_Within(), ST_DWithin() then SELECT rast that doesn't overlap other >50%</li>
</ul><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;clear:both;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:18px;background-color:rgba(248,248,248,0.6)">
What would you do in this situation?</p><div><br></div>-- <br>----<br>Jackie<br>
</div>