Hi Jorrit,

maybe it's just a type in the second setprocessing line of your example:

$current_layer->setprocessing('BANDS=1,2');  #removed second bracket

Cheers, Michael


2014-05-27 11:50 GMT+02:00 Jorrit Goddijn <jorrit.godd...@meteogroup.com>:

>  Hi all,
>
>
>
> I'm drawing layers based on GRIB data files. Each file contains several
> bands (datasets). I can access these datasets by setting the PROCESSING
> attribute on the LAYER object. As in this example:
>
>
>
> #########################
>
> LAYER
>
>       NAME "current_grid"
>
>       TYPE POINT
>
>       CONNECTIONTYPE uvraster
>
>       DATA "/var/www/mapserver/data/grib/routeguard/4nwwin99_2013110412.grb2"
> #v and u-component of current
>
>       PROCESSING "BANDS=1,2"
>
>       PROCESSING "UV_SPACING=20"
>
>       CLASS
>
>         STYLE
>
>           SYMBOL "arrow"
>
>           ANGLE [uv_angle]
>
>           SIZE [uv_length]
>
>           COLOR 255 0 0
>
>         END # style
>
>       END # class
>
>
>
>       PROJECTION
>
>           #"init=epsg:4326"
>
>           "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +pm=-360"
>
>       END
>
> END # layer
>
> ####################
>
>
>
> This works fine. But I need to set the PROCESSING values dynamically
> through mapscript. If I add this code to my script (which works fine
> without these lines):
>
>
>
> ####################
>
>     $map = ms_newMapObj($_GET['MAP']);
>
>     $current_layer = $map->getlayerbyname('current_grid');
>
>     // both of these do not work
>
>    //$current_layer->set('processing', 'BANDS=1,2'));
>
>     //$current_layer->setprocessing('BANDS=1,2'));
>
>     $request = createRequest("");
>
>    $result = $map->owsdispatch($request);
>
> ####################
>
>
>
> I get an internal server error (500). It seems that setting any attribute
> via the layer->set() method causes this behavior. I'm migrating from MS
> 5.4, does the set method still work as expected?
>
>
>
> Thank you
>
>
>
> Jorrit Goddijn
>
> jorrit.godd...@meteogroup.com
>
> MeteoGroup
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
-----------------------------------------------------------
Michael Schulz

Bahnhofstr. 62
D-63477 Maintal
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to