Map based on OpenStreetMap has its georeferencing changed
Steps to reproduce
- Create a large map by import from an OpenStreetMap export.
- Open the map with Mapper built with PROJ >= 7.2.
- View geographic coordinates of objects. View GPX tracks.
Actual behaviour
The objects' geographic coordinates are shifted by up to 5 meters, as are GPX track templates.
Expected behaviour
The map objects are positioned as in the original OpenStreetMap, and alignment of GPX tracks is unchanged.
Configuration
Mapper Version: 0.9.5
Operating System: Linux with PROJ 7.2.1 and 8.2.0. Android and Mac (PROJ 7.1.1 I think)
Investigation
Mapper uses an orthographic projection when creating a map by importing from OpenStreetMap data. Prior to 7.2, PROJ used a spherical projection for +proj=ortho. Then at 7.2 it added support for a true ellipsoidal projection, changing the meaning of the specification strings that had been used by Mapper's maps.
A user who encounters this effect can fix it by inserting "+f=0" into the specification string of the map.
A future release of Mapper that uses PROJ 7.1.1 would do better to include "+f=0" in the specification string when setting up an orthographic projection, because that would provide forward compatibility for any maps created. On the other hand, if the next Mapper release uses PROJ 7.2 or better, then the specification string could be left as is. The map would be created with an ellipsoidal projection which is superior, being isotropic at its reference point.
More Background
I noticed the problem due to field checking a point 5 km west of the map's reference point. The latitude of the map is 36° N. At that latitude, the spherical orthographic projection is distorted in horizontal scale by 0.12% and in vertical scale by 0.3%. The ellipsoidal orthographic projection used by PROJ 7.2 does not have that distortion.