Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to make color interpolation with SLD on Geoserver. Interpolation works fine. But i need to know min, middle and max property values to make it correct. So i want to know this values, i says:

  <LineSymbolizer>
         <Stroke>
           <CssParameter name="stroke">
             <ogc:Function name="Interpolate">
               <!-- Property to transform -->
               <ogc:PropertyName>AverageDailyIntensCar</ogc:PropertyName>

               <!-- Mapping curve definition pairs (input, output) -->
               <ogc:Literal>0</ogc:Literal>
               <ogc:Literal>#fefeee</ogc:Literal>

               <!--<ogc:Literal>15000</ogc:Literal>-->
               <ogc:Div>
                 <ogc:Function name="max">
                    <ogc:Literal>0</ogc:Literal>
                    <ogc:PropertyName>AverageDailyIntensCar</ogc:PropertyName>
                 </ogc:Function>
                 <ogc:Literal>2</ogc:Literal>
               </ogc:Div>
               <ogc:Literal>#00ff00</ogc:Literal>

               <!-- <ogc:Literal>-->
                  <ogc:Function name="max">
                    <ogc:Literal>0</ogc:Literal>
                    <ogc:PropertyName>AverageDailyIntensCar</ogc:PropertyName>
                 </ogc:Function>
              <!-- </ogc:Literal>-->
               <ogc:Literal>#ff0000</ogc:Literal>

               <!-- Interpolation method -->
               <ogc:Literal>color</ogc:Literal>
               <!-- Interpolation mode - defaults to linear -->
             </ogc:Function>
           </CssParameter>
         </Stroke>
      </LineSymbolizer>

Have no validation errors, but in layer preview i get all features with same colors.
My main problem is a middle value:

               <ogc:Div>
             <ogc:Function name="max">
                <ogc:Literal>0</ogc:Literal>
                <ogc:PropertyName>AverageDailyIntensCar</ogc:PropertyName>
             </ogc:Function>
             <ogc:Literal>2</ogc:Literal>
           </ogc:Div>
           <ogc:Literal>#00ff00</ogc:Literal>

Here something wrong becouse when i use Litteral for middle value interpolation works fine and i get features with differend colors.
Whats wrong here?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.