Opened 10 years ago
Closed 10 years ago
#2828 closed enhancement (fixed)
[raster] speed up ST_Envelope
Reported by: | strk | Owned by: | Bborie Park |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.2.0 |
Component: | raster | Version: | master |
Keywords: | history | Cc: |
Description
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.
See #2822
Change History (7)
comment:1 by , 10 years ago
Summary: | Speed up ST_Envelope → [raster] speed up ST_Envelope |
---|
comment:2 by , 10 years ago
Status: | new → assigned |
---|
comment:3 by , 10 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:5 by , 10 years ago
Keywords: | history added |
---|---|
Milestone: | → PostGIS 2.2.0 |
Resolution: | → fixed |
Status: | assigned → closed |
Version: | 2.1.x → trunk |
Fixed in trunk as of r12832
comment:6 by , 10 years ago
Resolution: | fixed |
---|---|
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 , 10 years ago
Resolution: | → fixed |
---|---|
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.