Opened 9 years ago
Closed 9 years ago
#2828 closed enhancement (fixed)
[raster] speed up ST_Envelope
|Reported by:||strk||Owned by:||Bborie Park|
I noticed that ST_Envelope(rast) is implemented as ST_Envelope(ST_ConvexHull(rast)).
I'm not sure if that's necessary. Ideally ST_Envelope should be able to give a response by only looking at the raster header, without even fully detoasting the raster.
Change History (7)
comment:1 by , 9 years ago
|Summary:||Speed up ST_Envelope → [raster] speed up ST_Envelope|
comment:2 by , 9 years ago
|Status:||new → assigned|
comment:3 by , 9 years ago
don't have the code in front of me but I recall the actual case rast::geometry implemented with ST_ConvexHull(rast)?
comment:4 by , 9 years ago
Yes, the cast to geometry is implemented as ST_ConvexHull(rast)
comment:5 by , 9 years ago
|Milestone:||→ PostGIS 2.2.0|
|Status:||assigned → closed|
|Version:||2.1.x → trunk|
Fixed in trunk as of r12832
comment:6 by , 9 years ago
|Status:||closed → reopened|
Did you forget to add a test for rt_envelope ? r12832 adds a reference to such test in raster/test/regress/Makefile.in but there's no such new test file.
comment:7 by , 9 years ago
|Status:||reopened → closed|
Oops. Forgot to add the files to git. Fixed as of r12859
ST_ConvexHull() is only detoasting the header. But the issue is that convexhull generates a geometry to generate a envelope geometry, an unnecessary step.