[postgis-tickets] [PostGIS] #4608: Geography GIST index fails on ST_Covers

PostGIS trac at osgeo.org
Fri Jan 3 05:02:55 PST 2020


#4608: Geography GIST index fails on ST_Covers
----------------------+---------------------------
  Reporter:  jgh      |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  high     |  Milestone:  PostGIS 3.0.1
 Component:  postgis  |    Version:  3.0.x
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by Algunenano):

 Some notes from reviewing this in detail:

 * Geometry:
 {{{
 {"st_containsproperly", RTOverlapStrategyNumber, 2, 0},
 }}}
   This doesn't match the old implementation and it should use
 RTContainsStrategyNumber: `SELECT $1 OPERATOR(@extschema at .~) $2 AND
 @extschema at ._ST_ContainsProperly($1,$2)'`.


 * Geography:
   - ST_Contains, ST_Within, ST_Touches, ST_3dIntersects (and some more)
 don't exist for geography.This isn't an issue, but I'm going to use
 RTMaxStrategyNumber for those cases to make it clearer in the
 implementation.
   - `ST_CoveredBy` is implemented as `SELECT $1 OPERATOR(@extschema at .&&)
 $2 AND @extschema at ._ST_Covers($2, $1)'` in prePG12, but as
 `geography_coveredby` in PG12. I think we should unify them to avoid
 confusion and always use `geography_coveredby`. Also, it's using
 `RTContainedByStrategyNumber` but it should use `RTOverlapStrategyNumber`
 for geography.
   - `ST_Covers`: As mentioned in #comment:3, it should also use
 `RTOverlapStrategyNumber`.


 To fix these 3 issues I plan to create 2 different strategy arrays, one
 for geometry and one for geography and choose based on the input, so it
 should be easy to add a new one (raster for example) when the time is
 right.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4608#comment:6>
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