[Geoserver-users] KML and SLD

Hi there

I try to get a KML or KMZ XML file for only a specific route in my wms
layer. With OpenLayers I use SLD. But my SLD_BODY does not operate.

Is it impossible to filter geo data with SLD and using KML support at same time?

http://localhost:8080/geoserver/wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG%3A4326&layers=topp:hikeroute&bbox=4,40,13,60&SLD_BODY=
...

And here the SLD_BODY (of course in real url encoded ;-))

<?xml version='1.0' encoding='UTF-8'?><sld:StyledLayerDescriptor
xmlns:sld='http://www.opengis.net/sld
xmlns:ogc='http://www.opengis.net/ogc
xmlns:gml='http://www.opengis.net/gml
version='1.0.0'><sld:NamedLayer><sld:Name>hikeroute_google_style</sld:Name><sld:UserStyle><sld:Name>hikeroute_google_style</sld:Name><sld:Title>geoserver
style</sld:Title><sld:Abstract>Generated by
GeoServer</sld:Abstract><sld:FeatureTypeStyle><sld:Rule><ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>id</ogc:PropertyName><ogc:Literal>110</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter><sld:LineSymbolizer><sld:Stroke><sld:CssParameter
name='stroke'>#EE0000</sld:CssParameter><sld:CssParameter
name='stroke-width'>3</sld:CssParameter></sld:Stroke></sld:LineSymbolizer></sld:Rule></sld:FeatureTypeStyle></sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>

Thank you for your help.
Regards,
Thomas

--
Thomas Zuberbuehler
http://www.zubi.li

hi,

it should work, using ogc Filter in SLD and receive kml/kmz.

here’s some filter im using, and it works,

ogc:Filter

ogc:PropertyIsNull
ogc:PropertyNameST_NAME</ogc:PropertyName>

</ogc:PropertyIsNull>

</ogc:Filter>

must be a problem in your filter “syntax”

2006/12/4, Thomas Zuberbuehler < tzuberbuehler@anonymised.com>:

Hi there

I try to get a KML or KMZ XML file for only a specific route in my wms
layer. With OpenLayers I use SLD. But my SLD_BODY does not operate.

Is it impossible to filter geo data with SLD and using KML support at same time?

http://localhost:8080/geoserver/wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG%3A4326&layers=topp:hikeroute&bbox=4,40,13,60&SLD_BODY=

And here the SLD_BODY (of course in real url encoded ;-))

<?xml version='1.0' encoding='UTF-8'?><sld:StyledLayerDescriptor

xmlns:sld='http://www.opengis.net/sld
xmlns:ogc=‘http://www.opengis.net/ogc
xmlns:gml=‘http://www.opengis.net/gml
version=‘1.0.0’>sld:NamedLayersld:Namehikeroute_google_style</sld:Name>sld:UserStylesld:Namehikeroute_google_style</sld:Name>sld:Titlegeoserver
style</sld:Title>sld:AbstractGenerated by
GeoServer</sld:Abstract>sld:FeatureTypeStylesld:Ruleogc:Filterogc:PropertyIsEqualToogc:PropertyNameid</ogc:PropertyName>ogc:Literal110</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>sld:LineSymbolizersld:Stroke<sld:CssParameter
name=‘stroke’>#EE0000</sld:CssParameter><sld:CssParameter
name=‘stroke-width’>3</sld:CssParameter></sld:Stroke></sld:LineSymbolizer></sld:Rule></sld:FeatureTypeStyle></sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>

Thank you for your help.
Regards,
Thomas


Thomas Zuberbuehler
http://www.zubi.li


Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

There's a chance there's some inconsistencies with KML and SLD, but our goal it to fully support it.

When you say you're using OpenLayers and SLD are you operating that against GeoServer? If not could you test the SLD against GeoServer, and confirm it works against png or some other normal image output?

If it does then please report this as a bug.

And note that if you change the KMScore parameter to 0 then it should return a raster in KMZ, which always should work with SLD (but sometimes doesn't look as good).

best regards,

Chris

jan wrobel wrote:

hi,

it should work, using ogc Filter in SLD and receive kml/kmz.

here's some filter im using, and it works,

<ogc:Filter>
           <ogc:PropertyIsNull>
            <ogc:PropertyName>ST_NAME</ogc:PropertyName>
                     </ogc:PropertyIsNull>
           </ogc:Filter>

must be a problem in your filter "syntax"

2006/12/4, Thomas Zuberbuehler < tzuberbuehler@anonymised.com <mailto:tzuberbuehler@anonymised.com>>:

    Hi there

    I try to get a KML or KMZ XML file for only a specific route in my wms
    layer. With OpenLayers I use SLD. But my SLD_BODY does not operate.

    Is it impossible to filter geo data with SLD and using KML support
    at same time?

    http://localhost:8080/geoserver/wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG%3A4326&layers=topp:hikeroute&bbox=4,40,13,60&SLD_BODY=
    <http://localhost:8080/geoserver/wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kml+XML&width=1024&height=1024&srs=EPSG%3A4326&layers=topp:hikeroute&bbox=4,40,13,60&SLD_BODY=&gt;
    ...

    And here the SLD_BODY (of course in real url encoded ;-))

    <?xml version='1.0' encoding='UTF-8'?><sld:StyledLayerDescriptor
    xmlns:sld='http://www.opengis.net/sld
    xmlns:ogc='http://www.opengis.net/ogc
    xmlns:gml='http://www.opengis.net/gml
    version='1.0.0'><sld:NamedLayer><sld:Name>hikeroute_google_style</sld:Name><sld:UserStyle><sld:Name>hikeroute_google_style</sld:Name><sld:Title>geoserver

    style</sld:Title><sld:Abstract>Generated by
    GeoServer</sld:Abstract><sld:FeatureTypeStyle><sld:Rule><ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>id</ogc:PropertyName><ogc:Literal>110</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter><sld:LineSymbolizer><sld:Stroke><sld:CssParameter

    name='stroke'>#EE0000</sld:CssParameter><sld:CssParameter
    name='stroke-width'>3</sld:CssParameter></sld:Stroke></sld:LineSymbolizer></sld:Rule></sld:FeatureTypeStyle></sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>

    Thank you for your help.
    Regards,
    Thomas

    --
    Thomas Zuberbuehler
    http://www.zubi.li

    -------------------------------------------------------------------------

    Take Surveys. Earn Cash. Influence the Future of IT
    Join SourceForge.net's Techsay panel and you'll get the chance to
    share your
    opinions on IT & business topics through brief surveys - and earn cash
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
    _______________________________________________
    Geoserver-users mailing list
    Geoserver-users@lists.sourceforge.net
    <mailto:Geoserver-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:1003,4574237e39892207481331!

------------------------------------------------------------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

!DSPAM:1003,4574237e39892207481331!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:1003,4574237e39892207481331!

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org