Antwort: [udig-devel] How to add a filter to a SLD rule?
Jesse Eichar
jeichar at refractions.net
Tue Mar 6 09:04:20 PST 2007
Ack, I had a response partially written for you but forgot to finish
it. Sorry about that. If you could do me a favour. I'd appreciate
a little code snippet for this that I can put in our code snippets
directory. You can see the existing code snippets at:
http://svn.geotools.org/udig/branches/1.1.x/udig/tutorials/
net.refractions.udig.code.examples/src/net/refractions/udig/code/
examples/
Jesse
On 6-Mar-07, at 12:36 AM, tony.roth at GMX.de wrote:
> I found some useful hints on
> http://docs.codehaus.org/display/GEOTOOLS/Expressions and http://
> docs.codehaus.org/display/GEOTOOLS/Upgrade+to+2.4.
>
> sorry, next time I will first check the documentation :)
>
> tony roth
>
> Hi list,
> I have a layer (geo resource based on a shape file) with point
> elements and I want them symbolized by different symbols. The
> grouping is based on an attribute (given by the db file). I have
> read how it looks like in the SLD xml with the ogc:filter elements
> and its children but I have no idea how to realize the right filter
> for <ogc: PropertyIsEqualTo>
> I guess I have to do this: For every group I generate the
> org.geotools.styling.Rule with PointSymbolizer and perhaps
> TextSymbolizer and then I have to add a filter with rule.setFilter
> (Filter filter). The Filter I have to generate with
> FilterFactoryFinder.createFilterFactory().create... but which kind
> of filter? Is it an attributeExpression (since I want to filter one
> of the attributes) or a Logic Filter?
> Finally I have one rule for each value and then I generate the
> FeatureTypeStyle based on these rules.
> I need help with the filter. The attribute is called "objecttype"
> and the attribute values are characters.
> Thank you!
> tony roth
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20070306/874d7d98/attachment.html
More information about the udig-devel
mailing list