Mercurial > gemma
view style-templates/sounding_results_areas_geoserver.sld-template @ 4657:a89e4db7980b
Add delta to reference waterlevel to current depth.
If the current waterlevel is at LDC the delta is 0 and the profile is drawn unchanged.
If the current waterlevel is higher the delta adds to the measured depth.
If the current waterlevel is below the delta subtracts from the measured depth.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 14 Oct 2019 14:44:51 +0200 |
parents | 84c8a3f9a42a |
children | 1653b13e0db6 |
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:se="http://www.opengis.net/se" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" version="1.1.0"> <NamedLayer> <se:Name>sounding_results_areas</se:Name> <UserStyle> <se:Name>sounding_results_areas</se:Name> <se:FeatureTypeStyle> <se:Name>area_colours</se:Name> <se:Description> <se:Abstract> FeatureTypeStyle defining colour classes for height attribute </se:Abstract> </se:Description> {{ range . -}} <se:Rule> {{- if not .HasLow }} <se:Name>≤ {{ printf "%g" .High }}</se:Name> <ogc:Filter> <ogc:PropertyIsLessThanOrEqualTo> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .High }}</ogc:Literal> </ogc:PropertyIsLessThanOrEqualTo> </ogc:Filter> {{- else if not .HasHigh }} <se:Name>> {{ printf "%g" .Low }}</se:Name> <ogc:Filter> <ogc:PropertyIsGreaterThanOrEqualTo> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .Low }}</ogc:Literal> </ogc:PropertyIsGreaterThanOrEqualTo> </ogc:Filter> {{- else }} <se:Name>≤ {{ printf "%g" .High }}</se:Name> <ogc:Filter> <ogc:And> <ogc:PropertyIsGreaterThan> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .Low }}</ogc:Literal> </ogc:PropertyIsGreaterThan> <ogc:PropertyIsLessThanOrEqualTo> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .High }}</ogc:Literal> </ogc:PropertyIsLessThanOrEqualTo> </ogc:And> </ogc:Filter> {{- end }} <se:MaxScaleDenominator>34e3</se:MaxScaleDenominator> <se:PolygonSymbolizer> <se:Fill> <se:SvgParameter name="fill">{{ .Color }}</se:SvgParameter> </se:Fill> <se:Stroke> <se:SvgParameter name="stroke">#404040</se:SvgParameter> <se:SvgParameter name="stroke-width">0.5</se:SvgParameter> </se:Stroke> </se:PolygonSymbolizer> </se:Rule> <se:Rule> {{- if not .HasLow }} <se:Name>≤ {{ printf "%g" .High }}</se:Name> <ogc:Filter> <ogc:PropertyIsLessThanOrEqualTo> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .High }}</ogc:Literal> </ogc:PropertyIsLessThanOrEqualTo> </ogc:Filter> {{- else if not .HasHigh }} <se:Name>> {{ printf "%g" .Low }}</se:Name> <ogc:Filter> <ogc:PropertyIsGreaterThanOrEqualTo> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .Low }}</ogc:Literal> </ogc:PropertyIsGreaterThanOrEqualTo> </ogc:Filter> {{- else }} <se:Name>≤ {{ printf "%g" .High }}</se:Name> <ogc:Filter> <ogc:And> <ogc:PropertyIsGreaterThan> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .Low }}</ogc:Literal> </ogc:PropertyIsGreaterThan> <ogc:PropertyIsLessThanOrEqualTo> <ogc:PropertyName>height</ogc:PropertyName> <ogc:Literal>{{ printf "%f" .High }}</ogc:Literal> </ogc:PropertyIsLessThanOrEqualTo> </ogc:And> </ogc:Filter> {{- end }} <se:MinScaleDenominator>34e3</se:MinScaleDenominator> <se:PolygonSymbolizer> <se:Fill> <se:SvgParameter name="fill">{{ .Color }}</se:SvgParameter> </se:Fill> </se:PolygonSymbolizer> </se:Rule> <se:VendorOption name="sortBy">height</se:VendorOption> {{ end }} </se:FeatureTypeStyle> <se:FeatureTypeStyle> <se:Name>area_labels</se:Name> <se:Description> <se:Abstract> FeatureTypeStyle for labels at colour areas </se:Abstract> </se:Description> <se:Rule> <se:MaxScaleDenominator>3e2</se:MaxScaleDenominator> <se:TextSymbolizer> <Halo></Halo> <se:VendorOption name="spaceAround">50</se:VendorOption> <se:Label> <ogc:Function name="Recode"> <ogc:Function name="numberFormat"> <ogc:Literal>0.000000</ogc:Literal> <ogc:PropertyName>height</ogc:PropertyName> </ogc:Function> <ogc:Literal>1.000000</ogc:Literal><ogc:Literal>1</ogc:Literal> <ogc:Literal>1.500000</ogc:Literal><ogc:Literal>1.5</ogc:Literal> <ogc:Literal>1.700000</ogc:Literal><ogc:Literal>1.7</ogc:Literal> <ogc:Literal>1.900000</ogc:Literal><ogc:Literal>1.9</ogc:Literal> <ogc:Literal>2.100000</ogc:Literal><ogc:Literal>2.1</ogc:Literal> <ogc:Literal>2.300000</ogc:Literal><ogc:Literal>2.3</ogc:Literal> <ogc:Literal>2.500000</ogc:Literal><ogc:Literal>2.5</ogc:Literal> <ogc:Literal>2.700000</ogc:Literal><ogc:Literal>2.7</ogc:Literal> <ogc:Literal>2.900000</ogc:Literal><ogc:Literal>2.9</ogc:Literal> <ogc:Literal>3.100000</ogc:Literal><ogc:Literal>3.1</ogc:Literal> <ogc:Literal>3.300000</ogc:Literal><ogc:Literal>3.3</ogc:Literal> <ogc:Literal>3.500000</ogc:Literal><ogc:Literal>3.5</ogc:Literal> <ogc:Literal>4.000000</ogc:Literal><ogc:Literal>4</ogc:Literal> <ogc:Literal>4.500000</ogc:Literal><ogc:Literal>4.5</ogc:Literal> <ogc:Literal>5.000000</ogc:Literal><ogc:Literal>5</ogc:Literal> <ogc:Literal>5.500000</ogc:Literal><ogc:Literal>5.5</ogc:Literal> <ogc:Literal>6.000000</ogc:Literal><ogc:Literal>6</ogc:Literal> <ogc:Literal>7.000000</ogc:Literal><ogc:Literal>7</ogc:Literal> </ogc:Function> </se:Label> <se:Font> <se:SvgParameter name="font-size">20</se:SvgParameter> <se:SvgParameter name="font-weight">bold</se:SvgParameter> <se:SvgParameter name="font-family">Sans Serif</se:SvgParameter> </se:Font> <se:LabelPlacement> <se:LinePlacement> <se:PerpendicularOffset>5</se:PerpendicularOffset> </se:LinePlacement> </se:LabelPlacement> <se:Fill> <se:SvgParameter name="fill">#000000</se:SvgParameter> </se:Fill> </se:TextSymbolizer> </se:Rule> <se:Rule> <se:MaxScaleDenominator>6e2</se:MaxScaleDenominator> <se:MinScaleDenominator>3e2</se:MinScaleDenominator> <se:TextSymbolizer> <Halo></Halo> <se:VendorOption name="spaceAround">50</se:VendorOption> <se:Label> <ogc:Function name="Recode"> <ogc:Function name="numberFormat"> <ogc:Literal>0.000000</ogc:Literal> <ogc:PropertyName>height</ogc:PropertyName> </ogc:Function> <ogc:Literal>1.000000</ogc:Literal><ogc:Literal>1</ogc:Literal> <ogc:Literal>1.500000</ogc:Literal><ogc:Literal>1.5</ogc:Literal> <ogc:Literal>1.700000</ogc:Literal><ogc:Literal>1.7</ogc:Literal> <ogc:Literal>1.900000</ogc:Literal><ogc:Literal>1.9</ogc:Literal> <ogc:Literal>2.100000</ogc:Literal><ogc:Literal>2.1</ogc:Literal> <ogc:Literal>2.300000</ogc:Literal><ogc:Literal>2.3</ogc:Literal> <ogc:Literal>2.500000</ogc:Literal><ogc:Literal>2.5</ogc:Literal> <ogc:Literal>2.700000</ogc:Literal><ogc:Literal>2.7</ogc:Literal> <ogc:Literal>2.900000</ogc:Literal><ogc:Literal>2.9</ogc:Literal> <ogc:Literal>3.100000</ogc:Literal><ogc:Literal>3.1</ogc:Literal> <ogc:Literal>3.300000</ogc:Literal><ogc:Literal>3.3</ogc:Literal> <ogc:Literal>3.500000</ogc:Literal><ogc:Literal>3.5</ogc:Literal> <ogc:Literal>4.000000</ogc:Literal><ogc:Literal>4</ogc:Literal> <ogc:Literal>4.500000</ogc:Literal><ogc:Literal>4.5</ogc:Literal> <ogc:Literal>5.000000</ogc:Literal><ogc:Literal>5</ogc:Literal> <ogc:Literal>5.500000</ogc:Literal><ogc:Literal>5.5</ogc:Literal> <ogc:Literal>6.000000</ogc:Literal><ogc:Literal>6</ogc:Literal> <ogc:Literal>7.000000</ogc:Literal><ogc:Literal>7</ogc:Literal> </ogc:Function> </se:Label> <se:Font> <se:SvgParameter name="font-size">16</se:SvgParameter> <se:SvgParameter name="font-weight">bold</se:SvgParameter> <se:SvgParameter name="font-family">Sans Serif</se:SvgParameter> </se:Font> <se:LabelPlacement> <se:LinePlacement> <se:PerpendicularOffset>5</se:PerpendicularOffset> </se:LinePlacement> </se:LabelPlacement> <se:Fill> <se:SvgParameter name="fill">#000000</se:SvgParameter> </se:Fill> </se:TextSymbolizer> </se:Rule> <se:Rule> <se:MaxScaleDenominator>5e3</se:MaxScaleDenominator> <se:MinScaleDenominator>6e2</se:MinScaleDenominator> <se:TextSymbolizer> <Halo></Halo> <se:VendorOption name="spaceAround">50</se:VendorOption> <se:Label> <ogc:Function name="Recode"> <ogc:Function name="numberFormat"> <ogc:Literal>0.000000</ogc:Literal> <ogc:PropertyName>height</ogc:PropertyName> </ogc:Function> {{ range . -}} {{ if .HasHigh -}} <ogc:Literal> {{- printf "%f" .High -}} </ogc:Literal><ogc:Literal> {{- printf "%g" .High -}} </ogc:Literal> {{ end -}} {{ end }} </ogc:Function> </se:Label> <se:Font> <se:SvgParameter name="font-size">12</se:SvgParameter> <se:SvgParameter name="font-weight">bold</se:SvgParameter> <se:SvgParameter name="font-family">Sans Serif</se:SvgParameter> </se:Font> <se:LabelPlacement> <se:LinePlacement> <se:PerpendicularOffset>5</se:PerpendicularOffset> </se:LinePlacement> </se:LabelPlacement> <se:Fill> <se:SvgParameter name="fill">#000000</se:SvgParameter> </se:Fill> </se:TextSymbolizer> </se:Rule> </se:FeatureTypeStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor>