[Geoserver-devel] [jira] Created: (GEOS-1999) SLD's <Size> tag does not affect Placemark elements

SLD's <Size> tag does not affect Placemark elements
---------------------------------------------------

                 Key: GEOS-1999
                 URL: http://jira.codehaus.org/browse/GEOS-1999
             Project: GeoServer
          Issue Type: Bug
          Components: Google Earth KML Output
    Affects Versions: 1.7.0-beta1
            Reporter: Tyler Erickson
            Assignee: Andrea Aime

The KML returned by GeoServer can be in two forms: Placemark or Overlay elements. The Overlay element displays scaled point graphics as described by the SLD, but the Placemark elements are not scaled and all placemark elements are the same size.

(i.e. the KML is missing the <IconStyle><scale> tag that would scale the placemark)

Here is an example SLD that returns a variable size point symbol...

<?xml version="1.0" encoding="iso-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <!-- a named layer is the basic building block of an sld document -->
  <NamedLayer>
    <Name>Object Tracking Style</Name>
    <UserStyle>
      <!-- they have names, titles and abstracts -->
      <Title>Object Tracking Style</Title>
      <Abstract>A style that symbolizes point objects that are being tracked</Abstract>
      <!-- FeatureTypeStyles describe how to render different features -->
      <!-- a feature type for points -->
      <FeatureTypeStyle>
        <!--FeatureTypeName>Feature</FeatureTypeName-->
        <Rule>
          <Name>Rule Default</Name>
          <Title>Default Rule</Title>
          <Abstract>Default Rule</Abstract>
          <!-- like a linesymbolizer but with a fill too -->
          <PointSymbolizer>
            <Graphic>
              <ExternalGraphic>
                <OnlineResource xlink:type="simple" xlink:href="http://maps.google.com/mapfiles/kml/shapes/donut.png&quot; />
                <Format>image/png</Format>
              </ExternalGraphic>
              <Mark>
                <Fill>
                  <CssParameter name="fill">#FF0000</CssParameter>
                  <CssParameter name="fill-opacity">1.0</CssParameter>
                </Fill>
              </Mark>
              <Size>
                <ogc:Mul>
                  <ogc:PropertyName>location_horiz_error</ogc:PropertyName>
                  <ogc:Literal>0.1</ogc:Literal>
                </ogc:Mul>
              </Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Here is an example KML that is returned by geoserver (that is missing a <scale> element...

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2&quot;&gt;
<Document>
  <name>KmlFile</name>
  <Style id="GeoServerStylev_observation.nfm-e769109_11aa6554706_-5628">
    <IconStyle>
      <Icon>
        <href>http://maps.google.com/mapfiles/kml/shapes/donut.png&lt;/href&gt;
      </Icon>
    </IconStyle>
  </Style>
  <Placemark id="v_observation.nfm-e769109_11aa6554706_-5628">
    <description><![CDATA[<h4>v_observation</h4>

<ul class="textattributes">
  <li><strong><span class="atr-name">observation_id</span>:</strong> <span class="atr-value">1904</span></li>
  <li><strong><span class="atr-name">datestamp</span>:</strong> <span class="atr-value">6/19/08 12:01 AM</span></li>
  
  <li><strong><span class="atr-name">location_horiz_error</span>:</strong> <span class="atr-value">500.0</span></li>
  <li><strong><span class="atr-name">location_vert</span>:</strong> <span class="atr-value"></span></li>
  <li><strong><span class="atr-name">location_vert_error</span>:</strong> <span class="atr-value"></span></li>
  <li><strong><span class="atr-name">direction</span>:</strong> <span class="atr-value"></span></li>
  <li><strong><span class="atr-name">speed</span>:</strong> <span class="atr-value"></span></li>
  <li><strong><span class="atr-name">observation_type_no</span>:</strong> <span class="atr-value">0</span></li>
  <li><strong><span class="atr-name">temp_object_id</span>:</strong> <span class="atr-value">1</span></li>
</ul>]]></description>
    <LookAt>
      <longitude>6.83558117478245</longitude>
      <latitude>4.60914294994307</latitude>
      <altitude>0</altitude>
      <range>700</range>
      <tilt>10</tilt>
      <heading>10</heading>
    </LookAt>
    <TimeStamp><when>2008-06-19T00:01:00-04:00</when>
</TimeStamp>
    <styleUrl>#GeoServerStylev_observation.nfm-e769109_11aa6554706_-5628</styleUrl>
    <Point>
      <coordinates>6.83558117,4.60914295,0</coordinates>
    </Point>
  </Placemark>
</Document>
</kml>

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira