Hi,
I was wondering if there's something like the vendor option <VendorOption name="forceLeftToRight">false</VendorOption> for vertical line geometries. Or if there's some other suggested way to have labels all facing the same way in this sort of situation:
http://skitch.com/alyssawright/dadsh/label-orientation
Below is the rule that I'm working with.
Thank you!
Alyssa.
<sld:Rule>
<sld:Name>Streets</sld:Name>
<sld:Title>Streets < 9K</sld:Title>
<sld:ElseFilter/>
<sld:MaxScaleDenominator>9000.0</sld:MaxScaleDenominator>
<sld:LineSymbolizer>
<sld:Stroke>
<sld:CssParameter name="stroke">#a5a5a5</sld:CssParameter>
<sld:CssParameter name="stroke-width">4</sld:CssParameter>
</sld:Stroke>
</sld:LineSymbolizer>
<sld:TextSymbolizer>
<sld:Label>
<ogc:PropertyName>namelow</ogc:PropertyName>
</sld:Label>
<sld:Font>
<sld:CssParameter name="font-family">SansSerif</sld:CssParameter>
<sld:CssParameter name="font-size">11</sld:CssParameter>
<sld:CssParameter name="font-style">normal</sld:CssParameter>
<sld:CssParameter name="font-weight">normal</sld:CssParameter>
</sld:Font>
<sld:LabelPlacement>
<sld:PointPlacement>
<sld:AnchorPoint>
<sld:AnchorPointX>
<ogc:Literal>0.0</ogc:Literal>
</sld:AnchorPointX>
<sld:AnchorPointY>
<ogc:Literal>0.5</ogc:Literal>
</sld:AnchorPointY>
</sld:AnchorPoint>
<sld:Rotation>
<ogc:Literal>0</ogc:Literal>
</sld:Rotation>
</sld:PointPlacement>
</sld:LabelPlacement>
<sld:Halo>
<sld:Radius>
<ogc:Literal>1</ogc:Literal>
</sld:Radius>
<sld:Fill>
<sld:CssParameter name="fill">#ffffff</sld:CssParameter>
<sld:CssParameter name="fill-opacity">.5</sld:CssParameter>
</sld:Fill>
</sld:Halo>
<sld:VendorOption name="labelAllGroup">true</sld:VendorOption>
<sld:VendorOption name="followLine">true</sld:VendorOption>
<sld:VendorOption name="group">true</sld:VendorOption>
<sld:VendorOption name="maxDisplacement">50</sld:VendorOption>
</sld:TextSymbolizer>
</sld:Rule>
On Tue, Sep 21, 2010 at 2:49 PM, alyssa wright <awright@anonymised.com> wrote:
Hi,
I was wondering if there's something like the vendor option
<VendorOption name="forceLeftToRight">false</VendorOption> for vertical
line geometries. Or if there's some other suggested way to have labels
all facing the same way in this sort of situation:
Best Note Taking App - Organize Your Notes with Evernote
Might it work better if you used a LinePlacement instead of the PointPlacement?
<sld:LinePlacement>
<sld:PerpendicularOffset>
<ogc:Literal>10</ogc:Literal>
</sld:PerpendicularOffset>
</sld:LinePlacement>
Ian
On 21/09/2010 21:08, Ian Turton wrote:
On Tue, Sep 21, 2010 at 2:49 PM, alyssa wright<awright@anonymised.com> wrote:
Hi,
I was wondering if there's something like the vendor option
<VendorOption name="forceLeftToRight">false</VendorOption> for vertical
line geometries. Or if there's some other suggested way to have labels
all facing the same way in this sort of situation:
http://skitch.com/alyssawright/dadsh/label-orientation
Might it work better if you used a LinePlacement instead of the PointPlacement?
<sld:LinePlacement>
<sld:PerpendicularOffset>
<ogc:Literal>10</ogc:Literal>
</sld:PerpendicularOffset>
</sld:LinePlacement>
Actually in the latest versions line placement is inferred by the
fact you're enabling followLine.
The issue I see is that the labelling code assumes both vertical orientations are readable and good. Readable they are, good they're not
as it makes reading the map with multiple orientations harder.
Alyssa, do you have a sample data set + styling I can use to reproduce
the issue? Should be just a matter of changing a <= into a < in the code, but I want to make sure
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
Thanks Andrea. I'm attempting to make these styles a bit more concise (as you suggested). So, here are more details:
The shapefile:
http://svn.opengeo.org/suite/trunk/data_dir/data/medford/medford_streets.shp
The style:
http://svn.opengeo.org/suite/trunk/data_dir/styles/medford_streets.sld
Best,
Alyssa.
On 9/21/10 4:42 PM, Andrea Aime wrote:
On 21/09/2010 21:08, Ian Turton wrote:
On Tue, Sep 21, 2010 at 2:49 PM, alyssa wright<awright@anonymised.com> wrote:
Hi,
I was wondering if there's something like the vendor option
<VendorOption name="forceLeftToRight">false</VendorOption> for vertical
line geometries. Or if there's some other suggested way to have labels
all facing the same way in this sort of situation:
http://skitch.com/alyssawright/dadsh/label-orientation
Might it work better if you used a LinePlacement instead of the PointPlacement?
<sld:LinePlacement>
<sld:PerpendicularOffset>
<ogc:Literal>10</ogc:Literal>
</sld:PerpendicularOffset>
</sld:LinePlacement>
Actually in the latest versions line placement is inferred by the
fact you're enabling followLine.
The issue I see is that the labelling code assumes both vertical
orientations are readable and good. Readable they are, good they're not
as it makes reading the map with multiple orientations harder.
Alyssa, do you have a sample data set + styling I can use to reproduce
the issue? Should be just a matter of changing a<= into a< in the
code, but I want to make sure
Cheers
Andrea