I have a style that uses if_then_else to get labelling to line up with a
carrow background graphic at the centroid of a line, Geoserver 2.11.1:

           <LabelPlacement>
             <PointPlacement>
               <Displacement>
                <DisplacementX>
                  <ogc:Function name="if_then_else">
                    <ogc:Function name="greaterThan">
                      <ogc:Function name="abs">
                        <ogc:Function name="endAngle">
                          <ogc:PropertyName>geom</ogc:PropertyName>
                        </ogc:Function>
                      </ogc:Function>
                      <ogc:Literal>90</ogc:Literal>
                    </ogc:Function>
                    <ogc:Literal>14</ogc:Literal>
                    <ogc:Literal>-22</ogc:Literal>
                  </ogc:Function>
                </DisplacementX>
                <DisplacementY>
                    -3
                </DisplacementY>
              </Displacement>
                ...
            </PointPlacement>
           </LabelPlacement>

(and similar for <Rotation> to get text the right way up)

The style renders with no problems...
<http://osgeo-org.1560.x6.nabble.com/file/t382437/eeh_od_lines.png> 
...but when I make a call to GetLegendGraphic this error is generated:

      java.lang.IllegalArgumentException: Filter Function problem for
function if_then_else argument #0 - 
      expected type boolean

The argument is the output from <ogc:Function name="greaterThan"> so it must
be boolean, so there must be something else going on. Ant wisdom much
appreciated.

Thanks,
Ian






--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to