#339 closed task (fixed)
[raster] ST_Band
Reported by: | mloskot | Owned by: | Bborie Park |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | raster | Version: | master |
Keywords: | history | Cc: |
Description (last modified by )
This tasks belongs to the Objective 0.1.6f specified in the WKT Raster roadmap
As stated in the comment 7 of the Specification Comments following the Code Sprint in http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking01, we should prefer the option of adding a band parameter to every function working on a single band like ST_AsTIFF(). In all these cases, if the band parameter is omitted, the function should work on the first band.
ST_Band() is nevertheless a must have function for future release.
Attachments (3)
Change History (23)
comment:1 Changed 11 years ago by
Owner: | changed from pracine to mloskot |
---|---|
Status: | new → assigned |
comment:2 Changed 11 years ago by
Version: | → trunk |
---|
comment:3 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Priority: | medium → low |
comment:4 Changed 11 years ago by
comment:5 Changed 10 years ago by
Milestone: | WKTRaster 0.1.6 → PostGIS 2.0.0 |
---|---|
Owner: | changed from mloskot to pracine |
Status: | assigned → new |
comment:6 Changed 10 years ago by
Status: | new → assigned |
---|
comment:7 Changed 10 years ago by
Summary: | [wktraster] Implement ST_Band function for raster → [raster] Implement ST_Band function for raster |
---|
comment:8 Changed 10 years ago by
Milestone: | PostGIS 2.0.0 → PostGIS Raster Future |
---|
comment:9 Changed 10 years ago by
Status: | assigned → new |
---|
comment:10 Changed 10 years ago by
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?
comment:12 Changed 10 years ago by
Owner: | changed from pracine to Bborie Park |
---|---|
Status: | new → assigned |
comment:13 Changed 10 years ago by
Summary: | [raster] Implement ST_Band function for raster → [raster] ST_Band |
---|
Changed 10 years ago by
Attachment: | st_band.patch added |
---|
Adds ST_Band support. Includes core and regression tests
comment:14 Changed 10 years ago by
Priority: | low → medium |
---|
I've added a patch including ST_Band support. Core and regression tests are included.
Changed 10 years ago by
Attachment: | st_band.2.patch added |
---|
tweaked patch so that patch can be applied in same manner as all dependent patches
comment:15 Changed 10 years ago by
Added new patch so that the patch can be applied in same manner as all other dependent incremental patches...
patch -p1 < st_band.patch
comment:16 Changed 10 years ago by
ST_Band should not return an error when specified band(s) is or are out of range. It should follow the rule established at the tip of rt_pg.c and the behavior of other functions taking a band argument which is to return NULL with a NOTICE. (We might want to create an new ticket for that.)
comment:17 Changed 10 years ago by
OK. I'll make the appropriate changes to all the other patches based upon that rule in rt_pg.c. I guess I never paid attention to that rule. My fault.
Changed 10 years ago by
Attachment: | st_band.3.patch added |
---|
Refactored to account for changed memory handling.
comment:18 Changed 10 years ago by
Attached latest ST_Band patch (st_band.3.patch) to refactor for changed memory handling. Merges cleanly against r7145. This is the first in the series of incremental patches.
comment:19 Changed 10 years ago by
Keywords: | history added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Added in r7147.
comment:20 Changed 10 years ago by
Milestone: | PostGIS Raster Future → PostGIS 2.0.0 |
---|
If we agree on lowering the priority of this ticket I will update the planification.