# JOSM/Plugins/Spline-drawing-tool

## Contents

## 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

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 Bézier 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.

## Availability

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

## Usage

- Select manual tool.
- 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.
- When add the third node(helping node "
*P1 from equation*") will result an curve way. ]

## Other example

## See also

JOSM/Plugins/Splinex another JOSM plugin for drawing splines

## Feedback and suggestions

For news ideas please provided them in this section

- Please change cursor when spline-mode is activated. - wambacher -
- I think it would be good to let edit the line before saving it as dots (if it's possible after saving it would be great too, but it can be harder). - kocio