Looking at the specification it almost seems you would need the equivalent of PointPlacement within LabelPlacement for Geometry so instead of having:
...
...
</PointPlacement
You would have something like:
...
...
</PontPlacement
Anyone know if something like this has/can be done?
Thanks, S.D.
----- Original Message ----
From: Samuel Doyle sdoyle_2@anonymised.com
To: geoserver-users@lists.sourceforge.net
Sent: Wednesday, June 13, 2007 7:34:06 PM
Subject: [Geoserver-users] SLD question regarding Geometry property
Hello,
I’m not sure if I’m on the right path here or not or if something like this is possible but I was wondering if there was a way to inspect the Geometry property within a LineSymbolizer and then use it to offset the actual plotted value?
So basically if I was drawing a line then for each point in that line have it run through some SLD rule to offset it by some amount of x and y pixels? This would be useful if you wanted to try to maintain a perspective of a layer on a map as you zoomed in or out.
Thanks, S.D.
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Samuel Doyle ha scritto:
Looking at the specification it almost seems you would need the equivalent of PointPlacement within LabelPlacement for Geometry so instead of having:
<Label>
...
</Label>
<LabelPlacement>
<PointPlacement>
...
</PointPlacement
</LabelPlacement>
You would have something like:
<Geometry>
...
</Geometry>
<GeometryPlacement>
<PointPlacement>
...
</PontPlacement
</GeometryPlacement>
Anyone know if something like this has/can be done?
Hum, this can be done using a function if I'm not mistaken.
Functions are a powerful, but poorly documented feature of Geoserver.
Basically, in each place where your SLD accepts an OGC Expression, you
can do computations and call functions, where the function list
is given in the capabilities document.
For example, instead of drawing the lines, you could buffer them and
paint the resulting polygons.
Now, unfortunately we don't have any docs beyond the list of names
in capabilities, but you can look at what functions we do here
directly in the code here:
http://svn.geotools.org/geotools/trunk/gt/modules/library/main/src/main/java/org/geotools/filter/function/
(each class represents a different function).
Now, we don't have the function you need, but writing one
would be easy (provided you have some java programming skills).
If you need help implementing it, let us know... unfortunately the
user guide is not very good from this point of view.
Hope this helps
Cheers
Andrea