[mapserver-dev] RE: MapServer and MultiBand-IMG

Steve Lime steve.lime at dnr.state.mn.us
Thu Nov 7 09:44:03 EST 2002

Hi Stepan/Oliver: This will be a great addition but I'd like  to run it
by Frank Warmerdam first since he's our raster guru and I don't know if
he had something else in mind (or already working in 3.7). I've cc'd the
developers list for feedback.


Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
>>> "Stepan Kafka" <stepan.kafka at centrum.cz> 11/05/02 16:56 PM >>>
Hi Oliver,
  I am sending you my changes in Mapserver source code to enable
raster bands. Only GDAL formats are supported. Originaly I tried it with
dev. code, I haven't try actual Mapserver version yet!
In map file the bands are supproted with LAYER COLOR parameter:

  NAME mylyr
  DATA landsat.tif
  COLOR 7 4 2  # the R G B channels

It would be better to use e.g. BANDS parameter, but I don't know, how to
introduce it.

Steve, if you consider it useful, can you involve these changes to
release? Can you help us with BANDS parameter. Thank you very much.
There are changes in today downloaded nighty build, I hope I haven't
forgotten anything (the source files are attached):

712 >   int band1, band2, band3;

1669 etc>   layer->band1 = -1;
  layer->band2 = -1;
  layer->band3 = -1;

1851 etc >
      if(getInteger(&(layer->band1)) == -1) return(-1);
      if(getInteger(&(layer->band2)) == -1) return(-1);
      if(getInteger(&(layer->band3)) == -1) return(-1);

475 etc >
     if(layer->band1 > 0){
        hBand1 = GDALGetRasterBand( hDS, layer->band1 );
        hBand2 = GDALGetRasterBand( hDS, layer->band2 );
        hBand3 = GDALGetRasterBand( hDS, layer->band3 );
        if( hBand1 == NULL || hBand2 == NULL || hBand3 == NULL )
            return -1;

494 > }

Stepan Kafka
Help Service Remote Sensing
tel: +420-327514118
mailto:kafka at email.cz

> Hi Stepan,
> I would really appreciate if you could send me the code or at least a
> binary containing your implementation. I agree that the results thru
> colorcube preprocessing are no good but I would love to try this with
> 3.7. And I think it would be great to see this functionality in a
> release. Most likely we need to develop some extented functions for

> project but it would be good if we don't need to reinvent the wheel.
> kind regards
> Oliver

More information about the mapserver-dev mailing list