[mapserver-users] accessing different band values in the same layer

thomas bonfort thomas.bonfort at gmail.com
Thu Jun 14 06:23:45 PDT 2012


Helen,
have you had a look at
http://mapserver.org/trunk/input/vector/vector_field.html (to be
released in 6.2, but should be functional already)

--
thomas

On Thu, Jun 14, 2012 at 3:21 PM, Helen San Segundo Navazo
<hsansegundo at meteo.cat> wrote:
> ok, thanks Mike.
> A solution could be to transform the raster in a shape file, and to put the
> different band values in different attributes of each element, and then use
> the attributes values for selecting symbol and angle.
> Thanks,
> Helen
>
> El 14/06/12 15:03, Smith, Michael ERDC-RDE-CRREL-NH escribió:
>
>> Helen,
>>
>> It does not appear that you can. Based on the docs
>>
>> Raster classifications always take place on only one raster band. It
>> defaults to the first band in the referenced file, but this can be altered
>> with the BANDS PROCESSING directive. In particular this means that
>> including even a single CLASS declaration in a raster layer will result in
>> the raster layer being rendered using the one band classification rules
>> instead of other rules that might have applied (such as 3 band RGB
>> rendering).
>>
>> http://mapserver.org/input/raster.html
>>
>>
>>
>> You could have multiple layers and do classification on each band by
>> changing the first value in the PROCESSING BANDS directive.
>>
>> Mike
>>
>>
>> On 6/14/12  8:27 AM, "Helen San Segundo Navazo"<hsansegundo at meteo.cat>
>> wrote:
>>
>>> Hi,
>>> I have a raster file with different bands inside it.
>>> when I create my mapfile inside the layer tag I can define the bands I
>>> want to access with  PROCESSING "BANDS=4,2,1"
>>> When I select 1 band I can access to its data using the EXPRESSION tag:
>>>     CLASS
>>>         NAME "0 - 5"
>>>         EXPRESSION ([pixel]>= 0 AND [pixel]<  5)
>>>         STYLE
>>>         COLOR 80 0 0
>>>         END
>>>     END
>>> But if I select more than one band, how can I do to acces to the
>>> different band values inside the same EXPRESSION tag? is it possible?
>>>
>>> The problem is that I have wind information in different bands, in one
>>> band I have speed and in other band I have direction, and I have to draw
>>> the wind symbol depending on both values.
>>> Is possible to acces to the different pixel band values inside the same
>>> EXPRESSION tag?
>>> Thanks,
>>> Helen
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list