Hello Joshua

Thanks a lot for your answer and idea.

We found out another problem: we import our data by FME. Importing the data
without any special specifications to PostGIS the geometry-type
"multipolygon" will be assigned (for polygon features). We don't need the
data to be "multipolygon" so trying out some things we transferred them to
normal "polygons". 
Applying my same SLD once more to these data the attribute-based color works
fine. There seems to be a problem in the combination Geoserver -
multipolygons and attribute-based displaying of the data. In our case the
problems were showing mainly in donut-objects. Is this a known problem with
Geoserver? Will this be fixed?

Kind regards

Lisa






Joshua M. Thompson-2 wrote:
> 
> On Wed, Dec 8, 2010 at 6:11 AM, lisa10 <[email protected]> wrote:
>>
>> Hello everybody
>>
>> I'm new in Geoserver and have a problem:
>> I've got a polygon layer in Geoserver and would like to color the
>> polygons
>> using one of its attribute value.
>>
>> To do so I've created an SLD style containing various rules as follows:
>>
>> ===
>>      <Rule>
>>       <Name>house</Name>
>>       <Title>house</Title>
>>       <ogc:Filter>
>>         <ogc:PropertyIsEqualTo>
>>           <ogc:PropertyName>art_code</ogc:PropertyName>
>>           <ogc:Literal>0</ogc:Literal>
>>         </ogc:PropertyIsEqualTo>
>>       </ogc:Filter>
>>       <MaxScaleDenominator>100000</MaxScaleDenominator>
>>       <PolygonSymbolizer>
>>         <Fill>
>>           <CssParameter name="fill">#FFB6C1</CssParameter>
>>         </Fill>
>>         <Stroke>
>>           <CssParameter name="stroke">#000000</CssParameter>
>>           <CssParameter name="stroke-width">0.5</CssParameter>
>>         </Stroke>
>>       </PolygonSymbolizer>
>>     </Rule>
>>
>>     ...more rules...
>> ===
>>
>> It's working more or less fine but when I preview the map and pan or
>> zoom,
>> the colors every now and then are changing inpredictably although for any
>> attribute value there's exactly set one rule so there shouldn't be any
>> confusions.
>>
>> Does anybody have an idea on what the problem could be?
> 
> I'd need to see the whole SLD to be sure, but I'm guessing that your
> MaxScaleDenominator causing some of these rules to stop being
> considered as you zoom out. Do you have an <ElseFilter /> rule in
> there somewhere that might be catching these cases?
> 
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Attribute-based-color-for-polygon-features-tp30395091p30498140.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to