[raster]: ST_Envelope for raster that considers only data values
|Reported by:||robe||Owned by:||Bborie Park|
This would be like our current ST_Envelop (we could add an optional arg). This would essentially return the envelop of a raster not considering no data values.
We can do this now with ST_Envelope(ST_Polygon ..) but that process is slow because it has to consider all pixels. This one wouldn't need to consider all pixels because it would start at the outer perimeter, collapse inward and stop checking once it hit a pixel with data, since the envelop can't get any smaller.
In dustymug's words:
We're looking for a boundary function rather than a polygon function (which includes holes for interior NODATA pixels). I'm looking for less than that — since I still expect it to be a rectangle, not a concave hull