[postgis-devel] [PostGIS] #339: [raster] Implement ST_Band function for raster

PostGIS trac at osgeo.org
Tue Apr 5 21:19:52 PDT 2011


#339: [raster] Implement ST_Band function for raster
----------------------------+-----------------------------------------------
 Reporter:  mloskot         |       Owner:  pracine              
     Type:  task            |      Status:  new                  
 Priority:  low             |   Milestone:  PostGIS Raster Future
Component:  postgis raster  |     Version:  trunk                
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by dustymugs):

 As part of the FV.01, I propose the following function versions for
 ST_Band:

 ST_Band(rast raster, nbands int[]) -> raster

     nbands is an array of 1-based band indices of the bands to copy into
 the output raster

     Ex: For a raster rast with 3 bands:

         ST_Band(rast, ARRAY[1,3,2])

         ST_Band(rast, ARRAY[3,2,1])

         You can rearrange the bands as above. You can also duplicate the
 bands:

         ST_Band(rast, ARRAY[1,2,3,2,1])

 ST_Band(rast raster, nband int) -> raster

     nband is a single integer of the 1-based band index of the band to
 copy into the output raster

     Ex: ST_Band(rast, 1)

         ST_Band(rast, 3)

 ST_Band(rast raster, nbands text) -> raster

     nbands is a comma separated string of 1-based band indices indicating
 the bands to copy into the output raster

     Ex: ST_Band(rast, '1,2')

         ST_Band(rast, '1,2,3, 1, 1 , 2')

 ST_Band(rast raster)

     the band to extract is automatically assumed to be one.

     Ex: ST_Band(rast) -> raster

 Should I include a expanded version of the ST_Band(rast raster, nbands
 text) to provide the ability to specify the delimiter?

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