70 | | The ST_Intersects(raster, geometry) functions may need to be adapted to use ST_Intersects(raster, raster). The difficulty will be for the functions to decide whether or not converting the raster to a geometry or converting the geometry to a raster is faster. |
| 70 | A refactored set of St_Intersects() for testing a raster and a geometry. The first set converts the geometry to a raster to see if the two rasters intersect. |
| 71 | |
| 72 | 3. ST_Intersects(rast raster, geom geometry, nband integer DEFAULT NULL) -> boolean |
| 73 | |
| 74 | 4. ST_Intersects(rast raster, nband integer, geom geometry) -> boolean |
| 75 | |
| 76 | The second set of ST_Intersects() for testing a raster and a geometry converts the raster to a geometry and sees if the geometries intersect. |
| 77 | |
| 78 | 5. ST_Intersects(geom geometry, rast raster, nband DEFAULT NULL) -> boolean |
| 79 | |
| 80 | The order in which the geometry and raster are passed into ST_Intersects determines which method of testing is used. If geometry is first, the raster is converted to a set of geometries. If raster is first, the geometry is converted to a raster. |
| 81 | |
| 82 | These set of functions are required because there are cases where ST_Intersects(raster, geometry) != ST_Intersects(geometry, raster). |
| 83 | |
| 84 | |