improvements for lines2curves.pl (BezierCurves)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

improvements for lines2curves.pl (BezierCurves)

Martin Ždila-2
Hello

We are using slightly modified tiles@home project to render map of Slovakia at http://www.freemap.sk/. To make the map nicer, we are using lines2curves.pl.

I found 2 problems there:

1. The script doesn't handle inner ways of multipolygons. Please check my patch that fixes this issue: http://pastebin.com/G92Khdda

2. last line segment of the polygon is not curved. Currently I can easily fix this problem because it is "slightly" more complicated than previous one.
Small improvement is gained if
    while (@$points_ref >= 3) {
is replaced by
    while (@$points_ref >= 2) {

This way only last node is left sharp, but the previous one is "weirdly" curved.

Could this be fixed? I can attach a very small example (osm and svg file), but I am not sure if this mailing list supports attachments.

Thanks in advance
Best regards
--
Ing. Martin Ždila
OZ Freemap Slovakia
tel:+421-908-363-848
mailto:[hidden email]
http://www.freemap.sk


_______________________________________________
Tilesathome mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/tilesathome
Reply | Threaded
Open this post in threaded view
|

Re: improvements for lines2curves.pl (BezierCurves)

Martin Ždila-2
Hi

Sending 2nd patch fixing also last segment of the polygon:
http://pastebin.com/V05aquPb

Best regards.

On Mon, Apr 11, 2011 at 12:28 PM, Martin Ždila <[hidden email]> wrote:

> Hello
> We are using slightly modified tiles@home project to render map of Slovakia
> at http://www.freemap.sk/. To make the map nicer, we are using
> lines2curves.pl.
>
> I found 2 problems there:
> 1. The script doesn't handle inner ways of multipolygons. Please check my
> patch that fixes this issue: http://pastebin.com/G92Khdda
> 2. last line segment of the polygon is not curved. Currently I can easily
> fix this problem because it is "slightly" more complicated than previous
> one.
> Small improvement is gained if
>     while (@$points_ref >= 3) {
> is replaced by
>     while (@$points_ref >= 2) {
> This way only last node is left sharp, but the previous one is "weirdly"
> curved.
> Could this be fixed? I can attach a very small example (osm and svg file),
> but I am not sure if this mailing list supports attachments.
> Thanks in advance
> Best regards
> --
> Ing. Martin Ždila
> OZ Freemap Slovakia
> tel:+421-908-363-848
> mailto:[hidden email]
> http://www.freemap.sk
>



--
Ing. Martin Ždila
OZ Freemap Slovakia
tel:+421-908-363-848
mailto:[hidden email]
http://www.freemap.sk

_______________________________________________
Tilesathome mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/tilesathome