1

I'm stuck with an old, weird version of Geoserver in our production environment (circa 2011, installed in an opengeo-suite directory). It seems the WPS extension is installed. On my http://www.our-domain.com/geoserver/web/ page, we've got the following details:

"..is running version 2.1-SNAPSHOT."

As well as Service Capabilities WPS 1.0.0 ..which leads me to believe the WPS extension is installed.

To establish the Geoserver style/layer config, I've followed the heatmap example in the Geoserver docs, as well as this one published by Boundless, in addition to a few others. They're all mostly identical with respect to the SLD, except for the first child element of the Transformation element tends to have one of two different name values..

<ogc:Function name="gs:Heatmap"> or <ogc:Function name="vec:Heatmap">

It doesn't matter which parameter value I use, Geoserver's SLD validator throws the following error concerning my SLD definition (bold emphasis mine):

org.xml.sax.SAXParseException; lineNumber: 14; columnNumber: 25; cvc-complex-type.2.4.a: Invalid content was found starting with element 'Transformation'. One of '{"http://www.opengis.net/sld":Name, "http://www.opengis.net/sld":Title, "http://www.opengis.net/sld":Abstract, "http://www.opengis.net/sld":FeatureTypeName, "http://www.opengis.net/sld":SemanticTypeIdentifier, "http://www.opengis.net/sld":Rule}' is expected.

I can add additional nodes, particuarly for FeatureTypeName and SemanticTypeIdentifier, and I can reduce this error to just, basically, "{Rule}' is expected". However I'm guessing about adding these extra nodes, and none of the examples I'm finding include them.. which further reduces my confidence that I'm on the right track.

It may be that our Geoserver version is simply too old for these renderers, but I thought I saw a 1.8 doc that had a similar example so I have to assume something else is amiss. FWIW this is my SLD xml, but it's basically the same as the Boundless example. Does anyone have any helpful insights?

<?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>Heatmap</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>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>
            <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="#FFFFFF" quantity="0.02" label="nodata" opacity="0" />
              <ColorMapEntry color="#4444FF" quantity=".1"   label="nodata" />
              <ColorMapEntry color="#FF0000" quantity=".5"   label="values" />
              <ColorMapEntry color="#FFFF00" quantity="1.0"  label="values" />
            </ColorMap>
          </RasterSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

1 Answer 1

2

There is a very real chance that the raster transforms are not supported by a GeoServer that old. Why not just upgrade? it's free!

Anyway, things to check:

  1. does it work? You can ignore the validator, as often the schema it is using lags behind what the actual code will accept.

  2. Look in the WPS getCapabilities response to find out what the process is called, over time the prefixes have changed but either of those should work if the process exists.

  3. Upgrade to a recent GeoServer (2.13.x) and all your issues will be gone.

3
  • You nailed it. Looking through getCapabilities() and sure enough I don't see anything for "Heatmap". I do have functions in the "gs" theme, as well as the wps, JTS, and gt themes. As for upgrading, I'm nervous to do that because it seems to be unconventionally installed...if the upgrade goes south, I'd have a big problem. Moreover, if anything about the production endpoints were to change, informing all the stakeholders and fixing the affected apps represents a lot of technological debt!
    – elrobis
    Aug 17, 2018 at 13:19
  • 1
    Do you want to know how many publicly available security fixes have been applied since 2.1?
    – Ian Turton
    Aug 17, 2018 at 13:21
  • 2
    Ian, do you really want him to lose sleep for the next month or so? :-) The short version is "too many to count" Aug 19, 2018 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.