[OSM-talk] JOSM geometry support

matthew-osm at newtoncomputing.co.uk matthew-osm at newtoncomputing.co.uk
Thu Aug 23 23:20:59 BST 2007


Hi,

On Thu, Aug 23, 2007 at 08:32:02AM +0200, Frederik Ramm wrote:
> >> I've played with the "align nodes in circle" function in JOSM for
> >> neatening up a large roundabout, but had problems due to the
> >> projection used in JOSM.  JOSM aligns the nodes in a perfect circle on
> >> its display screen, which of course gives a squashed circle on the map
> >> due to differing projection schemes.
> >>
> >> Are there any techniques to overcome this problem?  If not, I would
> >> add it to the desired features list.
> 
> Alex is right but I'd say this is a bug - aligning nodes in a circle 
> should never create a circle according to the current projection but 
> always a "real" one.

I'm responsible for that code. When I first wrote it I used lat and
lon, which is definitely not the correct thing to use. Imi said to use
east and north for the calculations, which is what it now does. My
understanding of projections and such like is very limited, so the
code can probably be improved somewhat.

In fact, the only way I can think of doing it properly would be to
imagine the world as a sphere (now there's a thing), and use a pair of
angles to describe the position. Someone else probably knows the
proper way to do it.

However, does the projection issue really show up on something as
small as roundabouts? Where I am they look fine, but I remember asking
at the time if anyone further north or nearer the equator could check
there, too.

Someone else has already pointed out the mini-bug in that it should
iterate a few times automatically until no change in node positions.
It's not been something important enough for me to fix, basically, but
would be trivial to do.

Cheers,

-- 
Matthew





More information about the talk mailing list