[postgis-devel] [PostGIS] #1536: [raster] There should be an option for certain variants of ST_Intersection(raster, raster)

PostGIS trac at osgeo.org
Mon Feb 6 12:33:47 PST 2012

#1536: [raster] There should be an option for certain variants of
ST_Intersection(raster, raster)
 Reporter:  pracine  |       Owner:  pracine      
     Type:  defect   |      Status:  new          
 Priority:  low      |   Milestone:  PostGIS 2.0.0
Component:  raster   |     Version:  trunk        
 Keywords:           |  

Comment(by pracine):

 Replying to [comment:10 dustymugs]:
 > If I'm intersecting two rasters using ST_Intersection, I'm expecting
 that the returning raster would have the pixels of one or both bands in
 the intersecting area.

 Agree. The question is not about which band to return. It's about taking
 nodata value into account or not. If I intersect a nodata pixel with a
 withdata pixel, I expect to get nodata. Intersect means "there is a value
 in the first raster AND a value in the second raster". It is both an
 extent intersection AND a value intersection. Actually the nodata values
 define the extent the rasters. They are implicit masks.

 That's the logic behind ST_Intersects(raster, geometry): It is not just an
 extent intersection. It is also a value intersection. If the geometry
 intersects only with nodata pixel, ST_Intersects returns false.

 > In your example with a circle raster and another raster with the
 function returning the band of the other raster, I'd expect the band
 returned to be constrained spatially to just the intersecting area and the
 pixels outside the circle to have a NODATA value.
 > In the situation where the other raster doesn't have a NODATA, it would
 be nice to have a NODATA parameter.


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