If you are interested, we are currently using a different approach to
polygon fills with hatching.
Instead of using a mark, we use an ExternalGraphic having as href a wms
request to geoserver itself.
As an example, this could be the content of <Fill>:
<GraphicFill>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple" xlink:href="<dynamic
geoserver hatch request>"/>
<Format>image/png</Format>
</ExternalGraphic>
<Size>10</Size>
</Graphic>
</GraphicFill>
where <dynamic geoserver hatch request> is a wms request with an inline
feature describing the hatch (together with color and thickness), such
as the following one (an horizontal hatch):
http://localhost:8080/geoserver/wms?bbox=1000000,4400000,1100000,4500000&Format=image/png&request=GetMap&transparent=true&width=100&height=100&srs=EPSG:23032&SLD_BODY=<StyledLayerDescriptor
version="1.0.0"
xmlns:gml="http://www.opengis.net/gml"><UserLayer><Name>pattern</Name><InlineFeature><FeatureCollection><featureMember><BodyPart><linestringProperty><gml:LineString><gml:coordinates>1001000,4451000
1101000,4451000</gml:coordinates></gml:LineString></linestringProperty></BodyPart></featureMember></FeatureCollection></InlineFeature><UserStyle><Name>patternStyle</Name><FeatureTypeStyle><Rule><LineSymbolizer><Stroke><CssParameter
name="stroke">%23FF0000</CssParameter><CssParameter
name="stroke-width">2</CssParameter></Stroke></LineSymbolizer></Rule></FeatureTypeStyle></UserStyle></UserLayer></StyledLayerDescriptor>
You can use <Size> to decide spacing and use <Rotation> too.
We find this method to be extremely flexible.
If you need further details, I will be glad to ask your questions.
Mauro Bartolomeoli
Tobias Spaltenberger wrote:
> Hi Andrea,
>
> while googling on how to make polygon fills with hatching, I found
> your mail and the following page:
> http://jira.codehaus.org/browse/GEOT-829.
>
> I was able to create hatched polygons using Geoserver 1.6.3 and the
> following SLD snippet:
>
> <sld:PolygonSymbolizer>
> <sld:Fill>
> <sld:GraphicFill>
> <sld:Graphic>
> <sld:Mark>
>
> <sld:WellKnownName>hatch</sld:WellKnownName>
> <sld:Fill>
> <sld:CssParameter
> name="fill">#00FF00</sld:CssParameter>
> </sld:Fill>
> </sld:Mark>
> </sld:Graphic>
> </sld:GraphicFill>
> </sld:Fill>
> <sld:Stroke>
> <sld:CssParameter name="Stroke">#000000</sld:CssParameter>
> <sld:CssParameter name="Stroke-width">1</sld:CssParameter>
> </sld:Stroke>
> </sld:PolygonSymbolizer>
>
> I haven't found out how to change stroke width and spacing (and
> rotation other than multiples of 45 degrees) of the hatching, I don't
> know if that is possible with this Mark...
>
> Greetings,
> Tobias
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users