OpenOrienteering / mapper

OpenOrienteering Mapper is a software for creating maps for the orienteering sport.
https://www.openorienteering.org/apps/mapper/
GNU General Public License v3.0
402 stars 106 forks source link

Invalid scale when importing data using Mercator projection #608

Closed kolesar-andras closed 8 years ago

kolesar-andras commented 8 years ago

I tried to import an .osm file into mapper version 0.6.1 using Mercator projection EPSG:3857. Measured lengths of roads are much larger than real length. This is because easting and norting units of Mercator projection are not meters (only at Equator). Ratio between real and displayed length equals to ratio of meters and easting/northing units and equals to cosine of average latitude.

I think users need to be warned when using a projection where projection units are not meters. Another solution could be using an average scale ratio between projection units and meters.

dg0yt commented 8 years ago

Why did you choose EPSG:3857?

It might make sense to warn users when the selected CRS is not suitable for local mapping as is the case with EPSG:3857 IMHO. (It is often tagged as "not a recognized geodetic system".) This would mean to create some kind of blacklist.

dg0yt commented 8 years ago

References:

Noel Zinn (2010): Web Mercator: Non-Conformal, Non-Mercator

kolesar-andras commented 8 years ago

I do not agree with author of this presentation. Names three projections:

Makes difference between Spherical Mercator and Web Mercator where these are the same. Declares Web Mercator as non-conformal and other two as conformal where all are conformal at small regions and all are non-conformal for larger areas.

I think EPSG:3857 is suitable for local mapping. OpenStreetMap uses this projection for editing by default.

Coordinates in database are stored as WGS-84 ellipsoidal latitude/longitude values and you can switch projection from Mercator to any EPSG code or projection descibed in PROJ WKT in JOSM editor. Contributors use different projections only when they use imagery that is not available in default EPSG:3857 projection.

Usual area of an orienteering is not noticeably affected by varying scale. On 5 kilometers from north to south edge of map cosine of latitude varies around the magnitude of 1/1000. It means that real scale of a 1:15000 scale map is 1:14992 on the north and 1:15008 on the south edge. It means a difference of 0.2 millimeters on the printed map.

dg0yt commented 8 years ago

Maybe both of us added some confusion to a valid point.

So you have chosen a Mercator projection for the spatial reference of your map. And you point out that the ratio of "grid units" and "meters on ground" is wrong. Correct?

Mapper effectively assumes that the "grid units" are more or less equal to meters on ground. This a sufficient assumption for some projections, within certain bounds of error. But the assumption does not hold in general. It does not take into account:

Reading Scale (Map) on Wikipedia, it seems to me that "point scale" and "particular scale" are synonyms for grid scale factor.

So the simplest thing we could do is to add a single, explicit "grid scale factor". It could be used as a combined grid-elevation factor for those that need it, or it could even convert units of measurement. The default value would be 1.0, any other value has to be provided by the user.

kolesar-andras commented 8 years ago

Simple and great solution!

dg0yt commented 8 years ago

With EPSG:3857, the problems are: