On Tue, Feb 25, 2014 at 1:00 PM, Jakob Ventin <[email protected]> wrote:

> Hi list,
>
> I have not found any way to style a line in a way that it is not visible
> for
> some length i both ends. Have you?
>

I don't believe SLD offers any immediate way... but I can think of a slow
one
that might work using existing GeoServer extensions


>
> <CssParameter name="stroke-dashoffset">60</CssParameter> will start drawing
> the line 60 px from the starting point, but how should i do the same in the
> endpoint?
>

Actually, the dashoffset just changes the starting point for the dashoffset
pattern,
so it cannot be replicated on the other side.

One thing that might work if your lines are mostly straight, but it's
somewhat complicated and inefficient,
is to extract the two end points, buffer them, and then perform a
difference,
using the many filter functions provided by GeoServer:
http://docs.geoserver.org/stable/en/user/filter/function_reference.html

See some examples here:
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/geometry-transformations.html

That said, it would be better to write a custom filter function to shorten
a line instead, which
would require some java programming. I think it's also possible to write
filter functions
using a scripting language with the geoscript hooks, but I can't find
documentation
on how to do that. Maybe Justin (cc'ed) has some pointers

Cheers
Andrea

-- 
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information ==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to