[OSM-dev] Drawing ways with bezier curves rather than linesegments

Andy Robinson Andy_J_Robinson at blueyonder.co.uk
Wed Jan 24 23:31:15 GMT 2007

I'll stand corrected on this but I recall we had a long discussion on bezier
curves maybe more than a year ago, a search of the list (probably on talk at
the time) should find something. One of the issues that was flagged at the
time was a patent that Navtech has on bezier curves. I think it was one of
the reasons the idea was dropped quicker than it might otherwise have been.



Andy Robinson
Andy_J_Robinson at blueyonder.co.uk 

>-----Original Message-----
>From: dev-bounces at openstreetmap.org [mailto:dev-bounces at openstreetmap.org]
>On Behalf Of Barry Crabtree
>Sent: 24 January 2007 10:54 PM
>To: Andreas Brauchli
>Cc: dev at openstreetmap.org
>Subject: Re: [OSM-dev] Drawing ways with bezier curves rather than
>	> I've been experimenting with using bezier curves to connect the
>	> segments in a way rather than using straight line segments as it
>	> done at the moment. There is a before and after image at
>	> http://wiki.openstreetmap.org/index.php/User:Dotbaz - this was
>	> somewhere (Kobenhavn) I caught as it was going past my tiles at home
>	> hopefully someone has recently edited this area and might know it!
>	the 2nd picture (with the railway station Wankdorf) is Berne,
>	Switzerland and i have to say it's impressive! at first i thought
>	rounding everything would be wrong since all geo-tools work with
>	straight lines (at least without the projection) but having seen it,
>	have to say it's much nicer to present (not to work with, but for
>	rendering/presentation) and it doesn't over-compensate as i thought
>	would
>It did the first time I ran it :-) - made for a very wavey map before I
>made sure it didn't make sharp angles curvy!
>	- it'd be nice to see it on a very long segment which has hard,
>	short turns on both ends. somewhat like a race-track but more
>	in the middle.
>	________
>	(________)
>It should deal with that fine - if the bends are sharp it doesn't try to
>over-curve them.
>	>
>	> Basically it post-processes the svg output from osmarender and
>	> replaces all the ways with bezier curves connecting the segments
>	> rather than straight line segments.
>	is the additional load on calc./rendering the curves heavy?
>The calculations are not too bad a little bit of vector maths to work out
>each control point per segment. & I think rendering the curves is pretty
>much optimised with vector drawing tools.
>	>
>	> I'd appreciate any feedback, and if anyone wants me to do a
>	> area, just mail me the svg & I'll reply with a 'smoothed' version!
>	how about a fully rendered planet.osm ;)
>Dream on :-)

More information about the dev mailing list