Hi List,

I have been trying to use the new heatmap transformation in version 2.2.3 but I 
think I must be doing something wrong.
I wish to display a layer defined using an SQL view. The query simply returns a 
Grid of points and for each point there is a temperature value, I am using the 
round function in the query to round the temperature value to the nearest 
integer.

I am using the SLD below, copied from the example and modified to (hopefully) 
work with my data. However, the entire map is produced in one colour (#FFFF00) 
but when I query the map by clicking on it in an Openlayers preview it shows 
correct values for the Temperatures and different locations on the map yield 
different values.

Any ideas?


<StyledLayerDescriptor version="1.0.0" 
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"       
 xmlns="http://www.opengis.net/sld";        
xmlns:ogc="http://www.opengis.net/ogc";        
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <NamedLayer>
    <Name>Heatmap</Name>
    <UserStyle>
      <Title>Heatmap</Title>
        <Abstract>A heatmap showing upper air temperature</Abstract>
        <FeatureTypeStyle>
          <Transformation>
            <ogc:Function name="gs:Heatmap">
              <ogc:Function name="parameter">
                <ogc:Literal>data</ogc:Literal>
              </ogc:Function>
              <ogc:Function name="parameter">
                <ogc:Literal>weightAttr</ogc:Literal>
                <ogc:Literal>temperature</ogc:Literal>
              </ogc:Function>
              <ogc:Function name="parameter">
                <ogc:Literal>radiusPixels</ogc:Literal>
                <ogc:Function name="env">
                  <ogc:Literal>radius</ogc:Literal>
                  <ogc:Literal>100</ogc:Literal>
                </ogc:Function>
              </ogc:Function>
              <ogc:Function name="parameter">
                <ogc:Literal>pixelsPerCell</ogc:Literal>
                <ogc:Literal>10</ogc:Literal>
              </ogc:Function>
              <ogc:Function name="parameter">
                <ogc:Literal>outputBBOX</ogc:Literal>
                <ogc:Function name="env">
                  <ogc:Literal>wms_bbox</ogc:Literal>
                </ogc:Function>
              </ogc:Function>
              <ogc:Function name="parameter">
                <ogc:Literal>outputWidth</ogc:Literal>
                <ogc:Function name="env">
                  <ogc:Literal>wms_width</ogc:Literal>
                </ogc:Function>
              </ogc:Function>
              <ogc:Function name="parameter">
                <ogc:Literal>outputHeight</ogc:Literal>
                <ogc:Function name="env">
                  <ogc:Literal>wms_height</ogc:Literal>
                </ogc:Function>
              </ogc:Function>
            </ogc:Function>
          </Transformation>
          <Rule>
            <RasterSymbolizer>
              <!-- specify geometry attribute to pass validation -->
              <Geometry>
                <ogc:PropertyName>location</ogc:PropertyName>
              </Geometry>
              <Opacity>0.6</Opacity>
              <ColorMap type="ramp">
                <ColorMapEntry color="#0047B2" quantity="-70" label="nodata" 
opacity="0" />
                <ColorMapEntry color="#005CE6" quantity="-60" label="-60" />
                <ColorMapEntry color="#1975FF" quantity="-50" label="-50" />
                <ColorMapEntry color="#4D94FF" quantity="-40" label="-40" />
                <ColorMapEntry color="#80B2FF" quantity="-30" label="-30" />
                <ColorMapEntry color="#B2D1FF" quantity="-20" label="-20" />
                <ColorMapEntry color="#CCE0FF" quantity="-10" label="-10" />
                <ColorMapEntry color="#FFFF00" quantity="0" label="0"/>
                <ColorMapEntry color="#FFCCB2" quantity="5" label="+5" />
                <ColorMapEntry color="#FFCCB2" quantity="10" label="+10" />
                <ColorMapEntry color="#FFB894" quantity="20" label="nodata" 
opacity="0"/>
              </ColorMap>
            </RasterSymbolizer>
          </Rule>
        </FeatureTypeStyle>
      </UserStyle>
    </NamedLayer>
</StyledLayerDescriptor>
*** This communication has been sent from World Fuel Services 
Corporation or its subsidiaries or its affiliates for the intended recipient 
only and may contain proprietary, confidential or privileged information. 
If you are not the intended recipient, any review, disclosure, copying, 
use, or distribution of the information included in this communication 
and any attachments is strictly prohibited. If you have received this 
communication in error, please notify us immediately by replying to this 
communication and delete the communication, including any 
attachments, from your computer. Electronic communications sent to or 
from World Fuel Services Corporation or its subsidiaries or its affiliates 
may be monitored for quality assurance and compliance purposes.***

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to