[postgis-devel] [PostGIS] #1404: [raster] raster2pgsql overviews don't look right

PostGIS trac at osgeo.org
Fri Dec 30 06:48:52 PST 2011


#1404: [raster] raster2pgsql overviews don't look right
-----------------------------+----------------------------------------------
  Reporter:  robe            |       Owner:  pracine      
      Type:  defect          |      Status:  reopened     
  Priority:  medium          |   Milestone:  PostGIS 2.0.0
 Component:  postgis raster  |     Version:  trunk        
Resolution:                  |    Keywords:               
-----------------------------+----------------------------------------------
Changes (by robe):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 Testing r8619(on windows)  I'm still observing some funkiness with
 overviews which seems sensitive to how I pick my chopping dimensions.  The
 tile I have is 5000x5000 pixels so it should in theory be nicely divisible
 by 125x125.

 I built two datasets like so and I was surprised to find that
 my 125x125 base and overview doesn't seem to ST_Intersect yet I do get
 reasonable
 && answers

 {{{
 raster2pgsql -I -e -F -C -Y -s 26986 -t 125x125 -l 2 23128870.sid.jpg
 boston_test_125_125_Y | %PSQL%

 raster2pgsql -I -e -F -C -Y -s 26986 -t 200x200 -l 2 23128870.sid.jpg
 boston_test_200_200_Y | %PSQL%
 }}}


 If I do a regular && check and compare to answer returned by intersects:

 {{{
 -- returns 12 | 0
 SELECT  Count(o2.rast) AS bbox_inter
         , COUNT(CASE WHEN ST_Intersects(o.rast, o2.rast) THEN 1 ELSE NULL
 END) As inter
  FROM boston_test_125_125_Y As o INNER JOIN
         o_2_boston_test_125_125_Y AS o2 ON o.rast && o2.rast
 WHERE ST_Intersects(o2.rast, ST_SetSRID(ST_Point(231724, 886309), 26986));


 -- returns 8, 6
 SELECT  Count(o2.rast) AS bbox_inter
         , COUNT(CASE WHEN ST_Intersects(o.rast, o2.rast) THEN 1 ELSE NULL
 END) As inter
  FROM boston_test_200_200_Y As o INNER JOIN
         o_2_boston_test_200_200_Y AS o2 ON o.rast && o2.rast
 WHERE ST_Intersects(o2.rast, ST_SetSRID(ST_Point(231724, 886309), 26986));

 }}}

 I have no clue what _ST_Intersects is doing except I can only assume that
 since && overshoots (the bounding box is a little bigger -- I will get
 some false positives - so 200x200 makes some sense, but why my 125x125
 returns nothing is kind of disturbing.)

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1404#comment:21>
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-devel mailing list