[josm-dev] Simple Addr Interpolation / utilsplugin2

Paul Hartmann phaaurlt at googlemail.com
Mon Oct 31 18:01:59 GMT 2011


On 10/31/2011 05:34 PM, Werner Horsch wrote:
> thanks to Paul my Netbeans is up and running and I've started coding this
> plugin
> 
> questions
> 1) to the utilsplugin2 coders.
> do you mind if I add this functionality to this plugin?

Please extend the plugin AddrInterpolation. (Add another menu item if
you like.)

> 2) is there a method to calculate distance between points and distance from
> a point to a way. what's the class containing it?
> For sure this is not a big deal to code but certainly there are a lot of
> geo-functions already coded in some library

Not really, most of the more complicated calculations are in screen
coordinates (projected coordinates to be precise). However, you can get
the "spherical" distance of two points in LatLon.greatCircleDistance.

Some stuff is in Geometry.java. For a way parallel to another street,
the following classes might be useful: MapPainter.OffsetIterator and
ParallelWays.

Paul



More information about the josm-dev mailing list