Advertisement
Guest User

Windbarb SLD

a guest
Mar 31st, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.12 KB | None | 0 0
  1. <StyledLayerDescriptor version="1.0.0"
  2.  xmlns="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml"
  3.  xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink"
  4.  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5.  xsi:schemaLocation="http://www.opengis.net/sld ./StyledLayerDescriptor.xsd">
  6.    <NamedLayer>
  7.       <Name>windbarbs</Name>
  8.       <UserStyle>
  9.          <Title>windbarbs</Title>
  10.          <FeatureTypeStyle>
  11.             <Transformation>
  12.                <ogc:Function name="ras:RasterAsPointCollection">
  13.                   <ogc:Function name="parameter">
  14.                      <ogc:Literal>data</ogc:Literal>
  15.                   </ogc:Function>
  16.                   <!-- Activate the logic to recognize the emisphere -->
  17.                   <ogc:Function name="parameter">
  18.                     <ogc:Literal>emisphere</ogc:Literal>
  19.                     <ogc:Literal>True</ogc:Literal>
  20.                   </ogc:Function>
  21.                   <ogc:Function name="parameter">
  22.                     <ogc:Literal>interpolation</ogc:Literal>
  23.                     <ogc:Literal>InterpolationBilinear</ogc:Literal>
  24.                   </ogc:Function>
  25.                   <ogc:Function name="parameter">
  26.                     <ogc:Literal>scale</ogc:Literal>
  27.                     <ogc:Function name="Categorize">
  28.                      <ogc:Function name="env">
  29.                        <ogc:Literal>wms_scale_denominator</ogc:Literal>
  30.                      </ogc:Function>
  31.                        <ogc:Literal>16</ogc:Literal>
  32.                        <ogc:Literal>100000</ogc:Literal>
  33.                        <ogc:Literal>8</ogc:Literal>
  34.                        <ogc:Literal>500000</ogc:Literal>
  35.                        <ogc:Literal>2</ogc:Literal>
  36.                        <ogc:Literal>1000000</ogc:Literal>
  37.                        <ogc:Literal>0.5</ogc:Literal>
  38.                        <ogc:Literal>5000000</ogc:Literal>
  39.                        <ogc:Literal>0.2</ogc:Literal>
  40.                        <ogc:Literal>10000000</ogc:Literal>
  41.                        <ogc:Literal>0.1</ogc:Literal>
  42.                        <ogc:Literal>20000000</ogc:Literal>
  43.                        <ogc:Literal>0.05</ogc:Literal>
  44.                        <ogc:Literal>60000000</ogc:Literal>
  45.                        <ogc:Literal>0.02</ogc:Literal>
  46.                     </ogc:Function>
  47.                   </ogc:Function>
  48.                </ogc:Function>
  49.             </Transformation>
  50.             <Rule>
  51.                <PointSymbolizer>
  52.                   <Graphic>
  53.                      <Mark>
  54.                        <WellKnownName>windbarbs://default(
  55.                         <ogc:Function name="sqrt">
  56.                           <ogc:Add>
  57.                               <ogc:Mul>
  58.                                 <ogc:PropertyName>u-component_of_wind_surface</ogc:PropertyName>
  59.                                 <ogc:PropertyName>u-component_of_wind_surface</ogc:PropertyName>
  60.                               </ogc:Mul>
  61.                               <ogc:Mul>
  62.                                 <ogc:PropertyName>v-component_of_wind_surface</ogc:PropertyName>
  63.                                 <ogc:PropertyName>v-component_of_wind_surface</ogc:PropertyName>
  64.                               </ogc:Mul>
  65.                           </ogc:Add>
  66.                          </ogc:Function>)[m/s]?emisphere=
  67.                         <ogc:PropertyName>emisphere</ogc:PropertyName>
  68.                        </WellKnownName>
  69.                           <Stroke>
  70.                              <CssParameter name="stroke">000000</CssParameter>
  71.                              <CssParameter name="stroke-width">1</CssParameter>
  72.                           </Stroke>
  73.                        </Mark>
  74.                        <Size>
  75.                         <ogc:Function name="Categorize">
  76.                               <!-- Value to transform -->
  77.                              <ogc:Function name="sqrt">
  78.                               <ogc:Add>
  79.                                 <ogc:Mul>
  80.                                  <ogc:PropertyName>u-component_of_wind_surface</ogc:PropertyName>
  81.                                  <ogc:PropertyName>u-component_of_wind_surface</ogc:PropertyName>
  82.                                 </ogc:Mul>
  83.                                 <ogc:Mul>
  84.                                  <ogc:PropertyName>v-component_of_wind_surface</ogc:PropertyName>
  85.                                  <ogc:PropertyName>v-component_of_wind_surface</ogc:PropertyName>
  86.                                 </ogc:Mul>
  87.                               </ogc:Add>
  88.                              </ogc:Function>
  89.                               <ogc:Literal>8</ogc:Literal>
  90.                               <ogc:Literal>1.543333332</ogc:Literal>
  91.                               <ogc:Literal>32</ogc:Literal>
  92.                            </ogc:Function>
  93.                        </Size>
  94.                        <Rotation>
  95.                           <ogc:Function name="Categorize">
  96.                                <!-- Value to transform -->
  97.                                <ogc:Function name="sqrt">
  98.                                 <ogc:Add>
  99.                                     <ogc:Mul>
  100.                                       <ogc:PropertyName>u-component_of_wind_surface</ogc:PropertyName>
  101.                                       <ogc:PropertyName>u-component_of_wind_surface</ogc:PropertyName>
  102.                                     </ogc:Mul>
  103.                                     <ogc:Mul>
  104.                                       <ogc:PropertyName>v-component_of_wind_surface</ogc:PropertyName>
  105.                                       <ogc:PropertyName>v-component_of_wind_surface</ogc:PropertyName>
  106.                                     </ogc:Mul>
  107.                                 </ogc:Add>
  108.                               </ogc:Function>
  109.  
  110.                                <!-- Output values and thresholds -->
  111.                                <ogc:Literal>0</ogc:Literal>
  112.                                <ogc:Literal>1.543333332</ogc:Literal>
  113.                                 <ogc:Function name="toDegrees">
  114.                             <ogc:Function name="atan2">
  115.                             <ogc:PropertyName>u-component_of_wind_surface</ogc:PropertyName>
  116.                             <ogc:PropertyName>v-component_of_wind_surface</ogc:PropertyName>
  117.                          </ogc:Function>
  118.                           </ogc:Function>
  119.                         </ogc:Function>
  120.                      </Rotation>
  121.                   </Graphic>
  122.                </PointSymbolizer>
  123.                <PointSymbolizer>
  124.                   <Graphic>
  125.                      <Mark>
  126.                        <WellKnownName>circle</WellKnownName>
  127.                         <Fill>
  128.                            <CssParameter name="fill">
  129.                               <ogc:Literal>#ff0000</ogc:Literal>
  130.                            </CssParameter>
  131.                         </Fill>
  132.                      </Mark>
  133.                      <Size>3</Size>
  134.                   </Graphic>
  135.                </PointSymbolizer>
  136.             </Rule>
  137.          </FeatureTypeStyle>
  138.       </UserStyle>
  139.    </NamedLayer>
  140. </StyledLayerDescriptor>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement