SLD filter with raster layers

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Nov 23 19:10:07 EST 2004


Sorry for the late answer.  I just check the problem and entered a Bug
1087 on it. There was effectivly a problem when a Filter was present in
the sld.  I corrected this in the Mapserver CVS so the the filter is
ignored in this case.

The way SLD Filter is implemented internally is that the Filter is
converted in a query (or a series of Queries) and the resulting shapes
of the query are returned using the drawquery functionnality of Mapserver.
  This does not direclty apply to raster layers. The way I see it, the
only Filter that make sense for Raster layers is a BBOX Filter which can
be used to modify the extents of the drawing area. This can also be
acheived through the BBOX parameter of the WMS request.  Do you think
that the WMS BBOX parameter is enough or do you see other use for
spaitial filters for rasters layers ?


Later,

Berend Veldkamp wrote:

> Hi,
>
> I been experimenting with sld filters, and so far, I've been able to use
> them with feature layers, but not with raster layers (GeoTIFF).
> The WMS request goes like this:
> http://localhost/cgi-bin/mapserv?map=../map/test.map&service=wms&version=1.0.0&request=getmap&layers=ras&sld=http://localhost/sld/raster.sld
>
>
> where raster.sld contains:
>
> <StyledLayerDescriptor version='1 0 0'>
>   <NamedLayer>
>     <Name>ras</Name>
>     <UserStyle>
>       <Title>ras</Title>
>       <FeatureTypeStyle>
>         <Rule>
>           <Filter>
>             <BBox>
>               <PropertyName>Geometry</PropertyName>
>               <Box srsName="EPSG:28992">
>                 <coordinates>0,0 100000,512500</coordinates>
>               </Box>
>             </BBox>
>           </Filter>
>
>           <RasterSymbolizer>
>             <Opacity>1.0</Opacity>
>             <ColorMap>
>               <ColorMapEntry color="#FF0000" quantity="64" />
>               <ColorMapEntry color="#00FF00" quantity="128" />
>               <ColorMapEntry color="#0000FF" quantity="200" />
>             </ColorMap>
>           </RasterSymbolizer>
>
>         </Rule>
>       </FeatureTypeStyle>
>     </UserStyle>
>   </NamedLayer>
> </StyledLayerDescriptor>
>
> When I leave out the <Filter> part, the layer is drawn, so maybe
> rasterlayers don't supports filters yet?
>
> I'm using a nightly build from sep 20. and as far as I can tell there
> haven't been any changes in this area, at least not in mapogcsld.c.
>
> Thanks, Berend
>
> --
> ____________________________
>
> Berend Veldkamp - ARIS
> http://www.aris.nl/
> ____________________________
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list