[GIS] How to write SLD rules with data-defined symbol size and color

sldsymbology

I have shapefile with points. They are classified – Graduated colors. I made SLD file with ArcMap2SLDConverter. I have a task to manual edit SLD file to show symbol diameters relating to field Area.

I need to create one rule (for symbol COLOR) relating to one attributes ("Class" column), and second rule (for symbol SIZE) relating to other attributes ("Area" column) for the same geometry. So now I have points with rules for symbol colors, but I don't know how to edit my .sdl file to insert rules for symbol size considering they are related to other attribute than those rules for symbol colors.

I don't know how to have two rules relating to two different attribute columns for the same shapefile?

Can someone help me with that task?

Thank you.

Best Answer

Check out the SLD Cookbook for examples of this. Despite it being on the GeoServer site it is nearly all applicable to all SLD implementations (and the bits that are GeoServer extensions are clearly marked)