Spline drawing tool

From OpenStreetMap Wiki
Jump to: navigation, search

Why using the Spline drawing tool plugin?


That plugin make an manual tool for editing ways more accurate, like Satellite image, generating an route more realistic with curves.

Mathematical bases

Bézier 2 big.gif

That tool is based on Bézier curves. A Bézier curve is defined by a set of control points P0 through Pn, where n is called its order (n = 1 for linear, 2 for quadratic, etc.). The first and last control points are always the end points of the curve; however, the intermediate control points (if any) generally do not lie on the curve.

In that tool is used quadratic Bézier curves. A quadratic Bézier curve is the path traced by the function B(t), given points P0, P1, and P2.


To draw a line using this equation, one can divide the curve into smaller segments, calculate the end points of each segment using the Bezier cubic equation and draw the line for the segment. For instance, one can draw a line between the points defined by t = 0 and t = 0.01, then t = 0.01 and t = 0.02, and so on.


The plugin should be available in your JOSM Plugins preference window under "Spline drawing tool" or you can download it from [1].


  1. Select manual tool Im1.png
  2. Next step is to call Bézier curve algorithm when in the way is added more then two nodes , until that, is active the User Interface that draw the curve.
  3. When add the third node(helping node "P1 from equation") will result an curve way

Other Example