[mapserver-users] SLD inline in WMS request

Tiemens, Gerben Gerben.Tiemens at grontmij.nl
Fri Oct 24 05:15:04 EDT 2008



Hello List,

Im trying to get a customized WMS result using SLD.

I tried several things with not fully satisfying results:

An sld parameter request:

http://gm21940:5000/cgi-bin/mapserv.exe?map=c:/project/legendamakenV2.map&service=wms&request=getmap&version=1.1.1&srs=epsg:28992&format=png&width=500&height=600&style=&layers=KLLine&bbox=165700,387800,165800,387900&sld=http://gm21940:5000/intersect.sld

Where sld =

<StyledLayerDescriptor version='1 0 0'>
  <NamedLayer>
    <Name>KLLine</Name>
    <UserStyle>
      <Title>KLLine</Title>
      <FeatureTypeStyle>
        <Rule>
          <Filter>
            <Intersect>
              <PropertyName>geometry</PropertyName>
              <Polygon srsName="EPSG:28992">
                <outerBoundaryIs>
                  <LinearRing>
                    <coordinates>165607,387820 165651,387813 165672,387759 165598,387800 165607,387820</coordinates>
                  </LinearRing>
                </outerBoundaryIs>
              </Polygon>
            </Intersect>
          </Filter>
          </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

This works partially. The features are filtered with the intersect request, but the labels on the features are lost.

I tried to modify my SLD to get also labels on the features, now using the SLD.  This doesn't work, no features are drawn at all.

Then i tried to set the filter= parameter in the WMS request. I've seen often that this works for WFS, but i tried the same on WMS and this didnt work.
I tried:   filter=<Filter><Intersect><PropertyName>geometry</PropertyName><Polygon srsName="EPSG:28992"><outerBoundaryIs><LinearRing>      <coordinates>165607,387820 165651,387813 165672,387759 165598,387800 165607,387820</coordinates></LinearRing></outerBoundaryIs></Polygon>      </Intersect></Filter>

This is according to the FilterEncoding page on the mapserver wiki a valid request for WFS. Isn't this a valid request for WMS?


The wanted result is:   an image with the requested extent, with the filtered intersection, using the mapserver styling.

The filtered intersection is custom, so an filter inside mapserver is not possible (or is this changable from url parameters?)



Greetings

Gerben


<< Please read our E-mail Disclaimer at the Grontmij Corporate website >>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081024/e732a558/attachment.html


More information about the mapserver-users mailing list