[postgis-tickets] [PostGIS] #3283: Corrupt cached bboxes gets created (m-value)

PostGIS trac at osgeo.org
Mon Sep 21 12:01:03 PDT 2015


#3283: Corrupt cached bboxes gets created (m-value)
---------------------+---------------------------
 Reporter:  nicklas  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 2.2.0
Component:  postgis  |    Version:  trunk
 Keywords:           |
---------------------+---------------------------
 This one really confuses me.

 to reproduce:
 Load the attached table (problem.backup).

 Then run:

 {{{

 select st_cpawithin(
 (select geom from p where gid = 1)
 ,
 (select geom from p where gid = 2)
 ,1000);

 }}}

 it is 2 trajectories that do not have overlapping m-values so should  just
 return false. Instead I get:

 {{{
 ERROR:  Could not find point with M=0 on first geom
 }}}

 After some investigation I have found that even if they do not have
 overlapping m-values, the cached bboxes have the same max-value in one as
 the min-value in the other.

 That it is the cached box that is the problem I think I can prove by
 running:


 {{{

 select st_cpawithin(
 (select PostGIS_DropBBox(geom) from p where gid = 1 and
 ST_IsValidTrajectory(geom))
 ,
 (select PostGIS_DropBBox(geom) from p where gid = 2 and
 ST_IsValidTrajectory(geom))
 ,1000);

 }}}

 which gives the right answer.

 I also haven't successed to get the error when putting wkt or wkb  other
 formats without cached box in the function with the exactly same
 geometries.



 postgis_full_version
 {{{

 POSTGIS="2.2.0dev r14034" GEOS="3.5.0dev-CAPI-1.9.0 r4082" PROJ="Rel.
 4.9.1, 04 March 2015" GDAL="GDAL 2.1.0dev, released 2015/99/99"
 LIBXML="2.9.1" LIBJSON="0.12.99" RASTER
 }}}

--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3283>
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