[josm-dev] Geometric calculations and projections
Matthias Julius
lists at julius-net.net
Tue Dec 8 14:33:02 GMT 2009
Frederik Ramm <frederik at remote.org> writes:
> Hi,
>
> Matthias Julius wrote:
>> IMHO, all those calculations should ideally be done using great
>> circles.
>
> I agree, but having implemented things like the (initial version of) the
> "make rectangular" function, which was difficult enough the way it is, I
> believe it will take a proper mathematician to do this if you want to
> introduce spherical angle calculations etc. - it is definitely not a
> matter of simply replacing a few variables here and there.
>
>> For most practical purposes using linear approximation with
>> latlon directly is probably good enough
>
> Definitely not. If you make a circle or a square using latlon values, it
> will only look right within a few degrees of the Equator.
Yes, of course. That would be a very rough "approximation".
>
>> Using Mercator for this might give better results.
>
> It does, but then that's what we do now, is it not?
It probably does for most people. Because Mercator is the default
projection in JOSM. But, JOSM really uses whatever projection is
currently selected. Essentially it uses screen coordinates.
>
>> Whatever the model is, I think the same one should be used for all
>> calculations.
>
> Ah, you mean that these calculations should always be based on a
> Mercator transformation even if you have something else selected.
Yes, Mercator or whatever is deemed the best approximation to reality
for a particular operation. Mercator might be the best to use for
most things because most maps are rendered in Mercator. And it is
probably good enough for all practical purposes. I hope nobody will
try to map the polar circle and expect JOSM to make it perfectly
circular. ;-)
Remember the days before Mercator was the default projection for JOSM?
There were discussions on the list like: "My roundabout is not round
on the map. What's going on?" - "You need to switch to Mercator to get
good looking roundabouts."
> Could probably be done, but would perhaps then require an
> explanatory note: "You have used the make circle function while
> using another projection than Mercator. The circle might not look
> like a real circle on your screen but believe us it is a circle!"
> ;-)
Something like that. Maybe that can be displayed when one selects
another projection: "Please be aware that this projection distorts the
map and circles may not look like circles."
Matthias
More information about the josm-dev
mailing list