fast rasterizer for thin lines; fix capitals
This commit is contained in:
parent
a6fd7999de
commit
e7e2097acf
2 changed files with 10 additions and 6 deletions
|
@ -86,19 +86,23 @@ def xml_pointsymbolizer(path="", width="", height="", opacity=1, overlap="false"
|
|||
def xml_linesymbolizer(color="#000000", width="1", opacity="1", linecap="butt", linejoin="round", dashes=""):
|
||||
color = nicecolor(color)
|
||||
linecap = {"none":"butt",}.get(linecap.lower(), linecap)
|
||||
dashes = ""
|
||||
if dashes:
|
||||
dashes = '<CssParameter name="stroke-dasharray">%s</CssParameter>'%(dashes)
|
||||
else:
|
||||
dashes = ""
|
||||
rasterizer = ""
|
||||
if float(width) < 2:
|
||||
rasterizer = ' rasterizer="fast"'
|
||||
|
||||
|
||||
return """
|
||||
<LineSymbolizer>
|
||||
<LineSymbolizer %s>
|
||||
<CssParameter name="stroke">%s</CssParameter>
|
||||
<CssParameter name="stroke-width">%s</CssParameter>
|
||||
<CssParameter name="stroke-opacity">%s</CssParameter>
|
||||
<CssParameter name="stroke-linejoin">%s</CssParameter>
|
||||
<CssParameter name="stroke-linecap">%s</CssParameter>
|
||||
%s
|
||||
</LineSymbolizer>"""%(color, float(width), float(opacity), linejoin, linecap, dashes)
|
||||
</LineSymbolizer>"""%(rasterizer, color, float(width), float(opacity), linejoin, linecap, dashes)
|
||||
|
||||
|
||||
def xml_polygonsymbolizer(color="#000000", opacity="1"):
|
||||
|
|
|
@ -716,8 +716,8 @@ node|z10-[aeroway=aerodrome]
|
|||
|
||||
|
||||
node|z3-6[capital=yes][population>5000000] { icon-image: adm_5.png;allow-overlap:true}
|
||||
node|z3[capital=yes][population>5000000] {text-offset:4; text:name; font-size:8; font-family: DejaVu Sans Bold; text-halo-radius:1; text-color:#ffffff;text-halo-color:#4D0000; text-allow-overlap: false; -x-mapnik-min-distance:0; text-align: left;}
|
||||
node|z4-6[capital=yes][population>5000000] {text-offset:6; text:name; font-size:10; font-family: DejaVu Sans Bold; text-halo-radius:1; text-color:#ffffff;text-halo-color:#4D0000; text-allow-overlap: false; -x-mapnik-min-distance:0; text-align: left;}
|
||||
node|z3[capital=yes][population>5000000] {text-offset:4; text:name; font-size:8; font-family: DejaVu Sans Bold; text-halo-radius:1; text-color:#ffffff;text-halo-color:#4D0000; text-allow-overlap: true; -x-mapnik-min-distance:0; text-align: left;}
|
||||
node|z4-6[capital=yes][population>5000000] {text-offset:6; text:name; font-size:10; font-family: DejaVu Sans Bold; text-halo-radius:1; text-color:#ffffff;text-halo-color:#4D0000; text-allow-overlap: true; -x-mapnik-min-distance:0; text-align: left;}
|
||||
|
||||
node|z4-5[place][population<100000][capital][admin_level<5] { icon-image:adm_4.png;
|
||||
text-offset:5; text:name; font-size: 7; font-family: DejaVu Sans Bold; text-halo-radius:1; text-color:#ffffff;text-halo-color:#4D0000; text-allow-overlap: false; -x-mapnik-min-distance:0;}
|
||||
|
|
Loading…
Add table
Reference in a new issue