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
399 stars 106 forks source link

Conversion Ocad -> OOM / does not keep coordinate reference system #2238

Closed ollesmaps closed 3 months ago

ollesmaps commented 5 months ago

This is probably only my lack of knowledge. Thanks for pointer!

When converting from Ocad - Germany ETRS Zone 32N to OOM

the name of the coordinate reference system is not kept.

Since this is German coordinate reference system and there is Gauss-Kruger in the list of possible coordinate reference systems in OOM, I have assumed the coordinate reference system will translate correctly...

See zipped file for the Ocad. Germany ETRS Zone 32N.zip

lpechacek commented 5 months ago

I'll have a look.

lpechacek commented 5 months ago

I'm no expert on the cartographic projections stuff, but from what I know Mapper has the following "naming" options:

1) "UTM", which has the WGS-84 geodetic datum 2) "Gauss-Kruger, Potsdam" - not familiar with that one but it's likely a national grid 3) "EPSG" - is a raw EPSG numeric code that is passed down to PROJ.4 library. The only exception is EPSG:5514 that gets translated mid-way, which has weird effects in some cases. 4) "Custom PROJ.4" - an option for true magicians.

From the above possibilities, I think that only the EPSG code option qualifies for the ETRS 89 / UTM projection. The "UTM" and "Germany" things do not apply because they are different systems, AFAICT.

That said, I believe that there is no "correct name" in Mapper.

The story is that OCD relies on the country names and associated list of projections (yes, they will have to rework the table when a new country comes to existence or a country substantially moves its borders) and Mapper leans more on the EPSG system. Here the translation goes from OCD "Germany/ETRS89-UTM-32N" to Mapper "EPSG:25832" and back to OCD "Germany/ETRS89-UTM-32N" (yes, sheer luck because we don't remember the OCD country designation in Mapper). We know about the reverse translation from EPSG code back to OCD grid+zone code problem and have a plan to keep the OCD code in the Mapper file. Implementation of the plan has not started, however.

Does that explain what you are seeing, Aleš?


OCD dump of the georeferencing object.

  string_table[3].len: 96
  string_table[3].obj_index: 0
  string_table[3].parameter_string: '\tm10000.000000\tg50.0000\tr1\tx744000\ty5446000\ta0.00000000\td50.00\ti8007\tb0.00\tc0.00\te25832'
  string_table[3].pos: 14980
  string_table[3].rec_type: 1039

Grid+zone parameter (i) is 8007. It translates to 8 (OCD Grid Germany) plus 7 (ETRS89 / UTM zone 32N in our records). That's in line with the initial report.

As a bonus, we can see undocumented parameter e whose value happens to match the EPSG code for ETRS89 / UTM 32N. :)

lpechacek commented 5 months ago

We know about the reverse translation from EPSG code back to OCD grid+zone code problem and have a plan to keep the OCD code in the Mapper file. Implementation of the plan has not started, however.

This part is tracked in #1921.

lpechacek commented 3 months ago

Does that explain what you are seeing, Aleš?

Discussed that in a face-to-face meeting. The issue indeed stems from the different naming systems. Closing (as a "duplicate").