Akos,
My first thoughts:
Create a polygon fill for the area with the slash. Then, have a second polygon
fill with a geometry transformation buffer and specify a negative value to have
a polygon smaller than the original polygon:
http://docs.geoserver.org/stable/en/user/filter/function_reference.html#filter-function-reference
HTH
Edward
Date: Mon, 29 Oct 2012 20:19:51 +0100
From: [email protected]
To: [email protected]
Subject: [Geoserver-users] line strokes with orientation independent of the
line angle using SLD?
Hi,
I wonder if it is possible or simple to create line strokes with SLD
which orientation is independent of the line's angle itself?
please see the image attached - I'd need to create a line symbolization
which has, on the inner side, a repeating 45 degree line coverage, which
is always at 45 degrees, independent of the orientation of the line. (in
the image, there are only vertical and horizontal sides to the outline,
but the slanted lines would be 45 degrees even if the ouline would be at
any random degrees). it's not a complete fill of the area, but just a
small part filled with the 45 degree line pattern on the inner side of
the polygon.
I was looking into LineSymbolizer the following way:
<sld:LineSymbolizer
uom="http://www.opengeospatial.org/se/units/metre">
<sld:Stroke>
<sld:GraphicStroke>
<sld:Graphic>
<sld:Mark>
<sld:WellKnownName>shape://slash</sld:WellKnownName>
<sld:Stroke>
<sld:CssParameter
name="stroke">#FF0000</sld:CssParameter>
<sld:CssParameter
name="stroke-width">5</sld:CssParameter>
</sld:Stroke>
</sld:Mark>
<sld:Size>100</sld:Size>
</sld:Graphic>
</sld:GraphicStroke>
</sld:Stroke>
</sld:LineSymbolizer>
but of course the orientation of the slash line will always be relative
to the orientation of the line that is being drawn itself.
is there a way to make the orientation of the Mark relative to the
canvas / map being drawn, as opposed to the line itself?
or maybe a filter function could return the angle of the line in
question, and then a rotation with the opposite angle would correct the
orientation? but I didn't find such a filter function on an initial
investigation.
or maybe a better approach is to think about some sort of 'fill', which
doesn't apply to the whole inner area of the polygon? maybe render the
polygon twice, once with original size & a full fill, and a smaller
sized polygon that masks the fill?
(another issue to solve is that I only need the slanted lines on the
inner side of the polygon, but this seems to be a simple issue to solve)
all pointers welcome,
Akos
------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users