WMS question

Bart van den Eijnden (OSGIS) bartvde at XS4ALL.NL
Thu Jun 22 02:14:03 EDT 2006


Hi,

an example SLD XML for highlighting a selection could be:

<StyledLayerDescriptor version="1.0.0">
  <NamedLayer>
    <Name>expressionbuildertempsld</Name>
    <UserStyle>
      <FeatureTypeStyle>
        <Rule>
          <Filter>
            <PropertyIsLike wildcard='@' singleChar='.' escape='!'>
              <PropertyName>OMSCHR</PropertyName>
              <Literal>Z@</Literal>
            </PropertyIsLike>
          </Filter>
          <PointSymbolizer>
            <Graphic>
              <Size>5</Size>
              <Mark>
                <WellKnownName>square</WellKnownName>
                <Fill>
                  <CssParameter name="fill">#ff0000</CssParameter>
                </Fill>
              </Mark>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Note there is some specific stuff (like the query OMSCHR like Z*) in there
for my dataset which you need to change.

You can put this on a webserver, eg http://localhost/mysld.xml and then
use the following in your WMS GetMap request

......&request=GetMap&sld=http://localhost/mysld.xml

Best regards,
Bart

> Hi Bart, i am trying to use sld_body to specifiy the path of the localurl
> for the xml file, but i get a blank image, i didnt really get the concept
> of how to write an xml file and then send it through the sld_body tag, can
> you suggest me with a real time example where a clear description is given
> as to how to specify the map file in the xml ...
>
>   well i guess i might have understood something wrong, but can you/anyone
> suggest me ...
>
>   i cut down my xml file to the following lines as i dont know what other
> lines mean
>
>   <StyledLayerDescriptor version="1.0.0">
>   <NamedLayer>
>   <Name>Layer Name</Name>
>   </NamedLayer>
>   </StyledLayerDescriptor>
>
>   Thanks for your time
>   kris
>
>
> "Bart van den Eijnden (OSGIS)" <bartvde at xs4all.nl> wrote:
>   This can be accomplished using SLD. In a WMS GetMap request you can add
> an inline SLD using the SLD_BODY parameter, or use the SLD parameter to
> point to a URL pointing to the actual SLD XML document.
>
> The Chameleon ExpressionBuilder widget has some code to do this or check
> out:
>
> http://mapserver.gis.umn.edu/docs/howto/sldhowto/?searchterm=SLD
>
> If a WMS layer is queryable, you can perform a WMS GetFeatureInfo
> request against it using an X and Y value in pixels, which can return a
> plain text, HTML or GML document.
>
> Best regards,
> Bart
>
> rock well wrote:
>
>> Hi all, i have a question in WMS, can a polygon be hightlighted in a
>> map in wms server, like can anything be included in the url that makes
>> a certain polygon marked, for example i want the border of the polygon
>> to be highlighted .... i was able to do it in mapscript but was
>> wondering if the same thing can be done in WMS ...
>>
>> one more thing, i am not pretty sure what query layer does in wms ...
>>
>> Thanks for your time
>> kris
>>
>> Want to be your own boss? Learn how on Yahoo! Small Business.
>>
>
>
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.



More information about the mapserver-users mailing list