[josm-dev] josm and other projection systems questions
matthew-osm at newtoncomputing.co.uk
matthew-osm at newtoncomputing.co.uk
Sun Aug 3 00:32:05 BST 2008
Hi Pieren,
On Sat, Aug 02, 2008 at 12:19:56PM +0200, Pieren wrote:
> - a problem with the tool "align nodes in circle" which is calculating the
> average position of the selected nodes. Unfortunately, this average is done
> with a first value initialized like this:
> new Node(new LatLon(0,0));
> but this is not workign with the Lambert projection (the east/north are high
> negativ values). I made a fix avoiding this kind of initial node but rather
> use the first "real" node as initial value. Is that the correct way to
> proceed (in which case I could submit the change) ?
I wrote that code.
That sounds fine - the only reason for the new LatLon(0,0) is to
get the initial node to have EastNorth coordinates of 0,0. This
was to allow an easy "for (Node n : nodes)" rather than doing a
loop that missed the first node.
A quick guess is that the easiest way to fix is probably to add:
avn.eastNorth = new EastNorth(0, 0);
after that line, but maybe your code is shorter?
Cheers,
--
Matthew
More information about the josm-dev
mailing list