[postgis-devel] [PostGIS] #1212: [raster]: st_intersects signature change - documentation out of synch

PostGIS trac at osgeo.org
Wed Sep 28 10:24:43 PDT 2011


#1212: [raster]: st_intersects signature change - documentation out of synch
----------------------------+-----------------------------------------------
 Reporter:  robe            |       Owner:  pracine      
     Type:  defect          |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by dustymugs):

 Replying to [comment:12 pracine]:
 > Replying to [comment:11 dustymugs]:
 > > I like Regina's compromise of turning ST_Intersects(raster, raster,
 int, int) into ST_Intersects(raster, raster) with the integers assumed to
 be 1 and 1.  This is consistent with other raster functions.
 >
 > Yes. This is the default. But what if I want to intersect band 2 of
 raster 1 with band 3 of raster 2?
 >

 ST_Intersects(raster1, raster1band2, raster2, raster2band3)

 > At the beginning there was this discussion about forcing users to use
 ST_Band() to select a particular band... We choose to add a band parameter
 to every function instead. That would be a solution if there is no cost
 but what a change for just a couple of variants.
 >

 We don't need ST_Band() and I don't see any mention of ST_Band outside of
 this...

 > I guess this is the first function taking two raster band. Right? This
 is why we are puzzled so much.
 >
 > On another side: Why is there two versions of _st_intersects(rast
 raster, geom geometry, nband integer DEFAULT NULL) in rtpostgis.sql.in.c?

 I kept the old raster converted to geometry functionality due to edge
 cases where a geometry-geometry intersects test is true while a raster-
 geometry intersects set is false.  Check the Working specs for a visual as
 I detailed out why I kept it.

 So, if ST_Intersects is called with the first argument being a raster...

 ST_Intersects(raster, geometry)

 the geometry is converted to raster and a raster-raster test ensues

 If ST_Intersects is called with a geometry as the first argument...

 ST_Intersects(geometry, raster)

 the raster is converted to a geometry and a geometry-geometry test occurs.

 Definitely check the working specs.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1212#comment:13>
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