+ Building/Raster symbolizers support
This commit is contained in:
parent
0f597b2809
commit
4388ff5fbc
1 changed files with 8 additions and 2 deletions
|
@ -27,7 +27,7 @@ def fixup_sym_attributes(sym):
|
||||||
for css in sym.CssParameter:
|
for css in sym.CssParameter:
|
||||||
key = css.attrib.get('name')
|
key = css.attrib.get('name')
|
||||||
value = css.text
|
value = css.text
|
||||||
attrib[key]=value
|
attrib[key] = value
|
||||||
sym.clear() # remove CssParameter elements
|
sym.clear() # remove CssParameter elements
|
||||||
for k,v in attrib.items(): # insert attributes instead
|
for k,v in attrib.items(): # insert attributes instead
|
||||||
sym.attrib[k] = v
|
sym.attrib[k] = v
|
||||||
|
@ -60,6 +60,12 @@ if __name__ == "__main__":
|
||||||
if hasattr(rule,'PolygonSymbolizer') :
|
if hasattr(rule,'PolygonSymbolizer') :
|
||||||
for sym in rule.PolygonSymbolizer:
|
for sym in rule.PolygonSymbolizer:
|
||||||
fixup_sym_attributes(sym)
|
fixup_sym_attributes(sym)
|
||||||
|
if hasattr(rule,'RasterSymbolizer') :
|
||||||
|
for sym in rule.RasterSymbolizer:
|
||||||
|
fixup_sym_attributes(sym)
|
||||||
|
if hasattr(rule,'BuildingSymbolizer') :
|
||||||
|
for sym in rule.BuildingSymbolizer:
|
||||||
|
fixup_sym_attributes(sym)
|
||||||
|
|
||||||
print etree.tostring(tree,pretty_print=True,standalone=True)
|
print etree.tostring(tree,pretty_print=True,standalone=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue