[josm-dev] Geometric calculations and projections

Frederik Ramm frederik at remote.org
Tue Dec 8 07:51:53 GMT 2009


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.

> Using Mercator for this might give better results.

It does, but then that's what we do now, is it not?

> 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. 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!" ;-)

Bye
Frederik





More information about the josm-dev mailing list