With this SLD it should be possible to change the attributes with the
env parameter:
<?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"
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 surface showing population density</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:Function name="env">
<ogc:Literal>weightAttr</ogc:Literal>
<ogc:Literal>population</ogc:Literal>
</ogc:Function>
</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:Function name="env">
<ogc:Literal>pixelsPerCell</ogc:Literal>
<ogc:Literal>10</ogc:Literal>
</ogc:Function>
</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>
<Geometry>
<ogc:PropertyName>the_geom</ogc:PropertyName></Geometry>
<Opacity>0.6</Opacity>
<ColorMap type="ramp" >
<ColorMapEntry color="#FFFFFF" quantity="0" label="nodata"
opacity="0"/>
<ColorMapEntry color="#FF00FF" quantity=".05"
label="values"/>
<ColorMapEntry color="#000000" quantity="0.1"
label="values"/>
<ColorMapEntry color="#0000FF" quantity="0.2"
label="values"/>
<ColorMapEntry color="#00FF00" quantity="0.3"
label="values"/>
<ColorMapEntry color="#FF0000" quantity="0.4"
label="values"/>
<ColorMapEntry color="#FF00FF" quantity="0.5"
label="values"/>
<ColorMapEntry color="#FF55FF" quantity="0.6"
label="value"/>
<ColorMapEntry color="#FF1111" quantity="0.7"
label="values"
/>
<ColorMapEntry color="#FFFF00" quantity="0.8"
label="values"
/>
<ColorMapEntry color="#FFFF00" quantity="0.9"
label="values"/>
<ColorMapEntry color="#00FFFF" quantity="1.0"
label="values"/>
</ColorMap>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
http://localhost:8081/geoserver/work/wms?service=WMS
&version=1.1.0
&request=GetMap
&layers=work:cbsa_pop
&env=pixelsPerCell:100
&styles=&bbox=-124.269371032715,32.5459365844727,-114.354026794434,41.9560432434082
&width=512
&height=485
&srs=EPSG:4326
&format=application/openlayers
and
http://localhost:8081/geoserver/work/wms?service=WMS
&version=1.1.0
&request=GetMap
&layers=work:cbsa_pop
&env=pixelsPerCell:10
&styles=&bbox=-124.269371032715,32.5459365844727,-114.354026794434,41.9560432434082
&width=512
&height=485
&srs=EPSG:4326
&format=application/openlayers
and the the weightAttr you should changeable with this:
http://localhost:8081/geoserver/work/wms?service=WMS
&version=1.1.0
&request=GetMap
&layers=work:cbsa_pop
&env=weightAttr:population
&styles=&bbox=-124.269371032715,32.5459365844727,-114.354026794434,41.9560432434082
&width=512
&height=485
&srs=EPSG:4326
&format=application/openlayers
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users