ugly formatting

26 views
Skip to first unread message

yobiSource

unread,
Nov 30, 2011, 5:03:19 PM11/30/11
to Mapnik to GeoTools Style Conversion
Hi,

after the converting all sld-files contain missing or too many line
breaks.
Can you fix this please?

yobiSource

example SLD:
<StyledLayerDescriptor version="1.0.0" xmlns:xlink="http://www.w3.org/
1999/xlink" xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://
www.opengis.net/sld">
<NamedLayer>
<Name>city</Name>
<UserStyle>
<Name>city</Name>
<FeatureTypeStyle>

<Rule><Filter xmlns="http://www.opengis.net/
ogc"><Or><PropertyIsEqualTo><PropertyName>place</
PropertyName><Literal>city</Literal></
PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>place</
PropertyName><Literal>metropolis</Literal></PropertyIsEqualTo></Or></
Filter><MinScaleDenominator>1500000</
MinScaleDenominator><MaxScaleDenominator>12500000</
MaxScaleDenominator><TextSymbolizer>
<Label>
<ogc:PropertyName>name</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">DejaVu Sans Book</
CssParameter>
<CssParameter name="font-size">8</CssParameter>


</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>
<ogc:Literal>0.5</ogc:Literal>
</AnchorPointX>
<AnchorPointY>
<ogc:Literal>0.5</ogc:Literal>
</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>
<ogc:Literal>0</ogc:Literal>
</DisplacementX>
<DisplacementY>
<ogc:Literal>0</ogc:Literal>
</DisplacementY>
</Displacement>
<Rotation>
<ogc:Literal>0</ogc:Literal>
</Rotation>
</PointPlacement>
</LabelPlacement>
<Halo>
<Radius>
<ogc:Literal>1</ogc:Literal>
</Radius>
<Fill>
<CssParameter name="fill">#ffffff</CssParameter>

</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#000000</CssParameter>

</Fill>

<VendorOption name="autoWrap">0</VendorOption>

<!--Map(fontset_name -> book-fonts, name -> name, dy -> 0,
size -> 8, wrap_width -> 0, fill -> #000, halo_radius -> 1)-->
</TextSymbolizer>


</Rule>
<Rule><Filter xmlns="http://www.opengis.net/
ogc"><Or><PropertyIsEqualTo><PropertyName>place</
PropertyName><Literal>city</Literal></
PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>place</
PropertyName><Literal>metropolis</Literal></PropertyIsEqualTo></Or></
Filter><MinScaleDenominator>400000</
MinScaleDenominator><MaxScaleDenominator>1500000</
MaxScaleDenominator><TextSymbolizer>
<Label>
<ogc:PropertyName>name</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">DejaVu Sans Book</
CssParameter>
<CssParameter name="font-size">11</CssParameter>


</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>
<ogc:Literal>0.5</ogc:Literal>
</AnchorPointX>
<AnchorPointY>
<ogc:Literal>0.5</ogc:Literal>
</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>
<ogc:Literal>0</ogc:Literal>
</DisplacementX>
<DisplacementY>
<ogc:Literal>0</ogc:Literal>
</DisplacementY>
</Displacement>
<Rotation>
<ogc:Literal>0</ogc:Literal>
</Rotation>
</PointPlacement>
</LabelPlacement>
<Halo>
<Radius>
<ogc:Literal>1</ogc:Literal>
</Radius>
<Fill>
<CssParameter name="fill">#ffffff</CssParameter>

</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#000000</CssParameter>

</Fill>

<VendorOption name="autoWrap">0</VendorOption>

<!--Map(fontset_name -> book-fonts, name -> name, dy -> 0,
size -> 11, wrap_width -> 0, fill -> #000, halo_radius -> 1)-->
</TextSymbolizer>


</Rule>
<Rule><Filter xmlns="http://www.opengis.net/
ogc"><Or><PropertyIsEqualTo><PropertyName>place</
PropertyName><Literal>city</Literal></
PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>place</
PropertyName><Literal>metropolis</Literal></PropertyIsEqualTo></Or></
Filter><MinScaleDenominator>25000</
MinScaleDenominator><MaxScaleDenominator>400000</
MaxScaleDenominator><TextSymbolizer>
<Label>
<ogc:PropertyName>name</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">DejaVu Sans Book</
CssParameter>
<CssParameter name="font-size">14</CssParameter>


</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>
<ogc:Literal>0.5</ogc:Literal>
</AnchorPointX>
<AnchorPointY>
<ogc:Literal>0.5</ogc:Literal>
</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>
<ogc:Literal>0</ogc:Literal>
</DisplacementX>
<DisplacementY>
<ogc:Literal>0</ogc:Literal>
</DisplacementY>
</Displacement>
<Rotation>
<ogc:Literal>0</ogc:Literal>
</Rotation>
</PointPlacement>
</LabelPlacement>
<Halo>
<Radius>
<ogc:Literal>1</ogc:Literal>
</Radius>
<Fill>
<CssParameter name="fill">#ffffff</CssParameter>

</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#000000</CssParameter>

</Fill>

<VendorOption name="autoWrap">0</VendorOption>

<!--Map(fontset_name -> book-fonts, name -> name, dy -> 0,
size -> 14, wrap_width -> 0, fill -> #000, halo_radius -> 1)-->
</TextSymbolizer>


</Rule>

</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>

David Winslow

unread,
Dec 12, 2011, 10:03:03 AM12/12/11
to Mapnik to GeoTools Style Conversion
oops, hit reply instead of reply-all.

---------- Forwarded message ----------
From: David Winslow <dwin...@opengeo.org>
Date: Mon, Dec 12, 2011 at 10:02 AM
Subject: Re: ugly formatting
To: yobiSource <yobis...@googlemail.com>


I have posted https://github.com/dwins/mapnik2geotools/issues/31 to track progress on this issue.  I usually do a little coding over the holiday break so I might take a look at this then. Should be a pretty easy fix if you want to get your hands dirty too ;)

--
David Winslow
Reply all
Reply to author
Forward
0 new messages