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 have polygon like sector. I want to fill it with gradient color.

Is it possible to do this in Geoserver?

Thanks.

UPDATE

I found some code with filling image

<FeatureTypeStyle>
 <Rule>
   <PolygonSymbolizer>
     <Fill>
       <GraphicFill>
         <Graphic>
           <ExternalGraphic>
             <OnlineResource
               xlink:type="simple"
               xlink:href="colorblocks.png" />
             <Format>image/png</Format>
           </ExternalGraphic>
         <Size>93</Size>
         </Graphic>
       </GraphicFill>
     </Fill>
   </PolygonSymbolizer>
 </Rule>

i can put here big circle which is gradient, but does it has rotation or position of image?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

SLD does not support gradient fills. The above will just repeat the image you provided over and over like tiles in a map until the polygon is filled. I guess if you use a large enough image it will look more or less like a gradient fill. It is possible to add support for gradient fills by coding, but it's not going to be trivial.

share|improve this answer
    
would be interesting how to fill gradient by coding :) Thanks –  Iliaka Jun 30 '12 at 9:11
    
Can you ask on geotools-devel? The answer would be very long... –  Andrea Aime Jun 30 '12 at 21:15
add comment

Your Answer

 
discard

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

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