[postgis-devel] [PostGIS] #1245: ST_AddMultiBand that can add multiple bands to an existing raster
PostGIS
trac at osgeo.org
Mon Oct 17 07:54:57 PDT 2011
#1245: ST_AddMultiBand that can add multiple bands to an existing raster
-------------------------+--------------------------------------------------
Reporter: robe | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS Raster Future
Component: postgis | Version: trunk
Keywords: |
-------------------------+--------------------------------------------------
It's been bugging me for a while that a lot of code we have for adding
multiple bands to a raster looks like this:
{{{
ST_AddBand(ST_AddBand(ST_MakeEmptyRaster(100,100,0,0,1,-1,0,0, -1),
'1BB'), '4BUI') ;
}}}
There are two issues I see with this calling of multiple ST_AddBand
1) Each call I can only assume requires a memcopy of the previous raster
which would be avoided if you can pass all the bands in a single call.
2) It's kinda long to type
Overloading the ST_AddBand I think will get problematic with casting of
arrays etc.
But perhaps an ST_AddMultiBand or something like that
Which will
1) Have a proto to allow you to add a range of bands from one raster to
another
kind of like ST_Band().. so I could do something like
ST_AddMultiBand(newrast, ST_Band(oldrast,ARRAY[1,4]) )
or
ST_AddMultiBand(newrast, ARRAY['8BUI', '8BUI'])
etc.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1245>
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