[PostGIS] #5750: Overestimated extent from ST_EstimatedExtent result for geography column
PostGIS
trac at osgeo.org
Sun Jun 23 14:05:46 PDT 2024
#5750: Overestimated extent from ST_EstimatedExtent result for geography column
----------------------+-------------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS Fund Me
Component: postgis | Version: master
Resolution: | Keywords: extent, geography
----------------------+-------------------------------
Changes (by pramsey):
* milestone: PostGIS 3.5.0 => PostGIS Fund Me
Comment:
Copying in note from chat
this is expected… so the statistics and the index both probably have an
idea of the extent that matches what’s in your head (something taller than
it is wide). But our path to converting that geocentric box into something
planar is this:
* find all the corners of the geocentric box
* find the average corner (which will be fairly central) so call it the
center
* find the furthest corner from the center, make the distance to that
corner by the radius
* you now have a “cap”, a center and a radius, that contains the original
box, however said “cap” is as wide as it is tall
* find the planar bounds of that cap, which also ends up as wide as it is
tall
(edited)
So the problem is, again, converting from a geocentric bounding volume to
a planar rectangle that works in all cases. Your example extent does in
fact contain the input, just with a lot of over coverage, but still:
contract met!
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5750#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list