Mapper: Map as template - wrong placement

Created on 14 Mar 2018  ·  18Comments  ·  Source: OpenOrienteering/mapper

Steps to reproduce

  1. Use files from attached archive
  2. Open _map.omap_
  3. Add _template.omap_ as template for _map.omap_

Actual behaviour

Template is opening in wrong location

Expected behaviour

_map.omap_ and _template.omap_ are different versions of one map. They must be adjusted absolutely precisely.

Configuration

Mapper Version: reproduced on 0.8.20180113 and 0.8.1; Not reproduced on 0.7.0
Operating System: Tested on Linux and Windows

Most helpful comment

EPSG 3785 you mention belongs to deprecated EPSG code which was wrongly defined, see Correct is 3857

Workflow with new project:

  1. Set coordinate system you want to use - here UTM 35 N.
  2. Locate approximate centre of future map in OpenStreetMap, in hyperlink you can see geographic coordinates in degrees
  3. Rewrite these coordinates into Geographic coordinates field (when typing UTM coordinates will also appear, map coordinates have 0,0 values all the time)
  4. It is not necessary but good to round up UTM coordinates to thousands (your grid will be compliant with 1 km UTM grid)
  5. Click Lookup to obtain declination. Fill the value and grivation is calculated.
  6. Done.

clipboard01

When opening georeferenced template in different coordinate system you must specify EPSG code. For your template use 3857.

Your file with new settings:
map_cleanFile.zip

All 18 comments

When you are back from the north pole, we need to find out how the georeferencing could become wrong...

Seriously, if you didn't mistype the coordinates in the georeferencing, it must have been broken by a transformation during import. There should be an import warning about adjusted coordinates, at least with older versions of the file.

Please note - template.omap is just a copy of map.omap with some updates. When open these files as a map, the coordinates looks good on both. GPS tracking works as expected as well. Obviously, something goes wrong with template import.

When open these files as a map, the coordinates looks good on both. GPS tracking works as expected as well.

I doubt that. That's what I get in the georeferencing dialog:
north-pole

That's where my remark about the north pole came from.

Please do not doubt. You can recheck it attaching my GPS track. Also you can see proper coordinates of cursor in the status bar.

I'm also confused by strange meanings in the 'Reference point' section, but as I understood from issue https://github.com/OpenOrienteering/mapper/issues/830 I should not rewrite them.

Typically I grab the georeferenced template from SAS Planet. Maybe I'm making a mistake somewhere... Here is the template sample. (Template CRS -> by EPSG -> 3785 )
Anyway, expected behaviour for opening the same map as a template - it is opening in same location.

The GPS track is broken. Loading the JPG template works.

Anyway, even if the GPX and the JPG happen to work for you: With the shown georeferencing, you are in the land of "undefined behaviour": Things may happen to work (JPG, GPX). But for sure the sun is not going to rise in the east (and declination lookup won't give you a reasonable value for the mapped area). Where the behaviours is undefined, there are no valid bugs.

Choose a reasonable reference point.

Here is my workflow to found a new map starting with georeferenced template:

  1. Create new file
  2. Configure map CRS and declaration
  3. Open the georeferenced template
  4. Ready to go to fieldwork

Should I additionally choose a reasonable reference point when it is already provided by the world file? Let me remind you that there is no convenient way to do this.

There is no such thing. What is the use case for changing both paper and real reference point synchonously? The intented use case is picking out a prominent point feature and entering the known coordinates of this feature.

I always define reference point first before opening any template. Remember that reference point plays key role during transformations, rotation and import of data.
Now your setting is completely invalid as is out of 3785 bounds.

Thank you for your answer, @krticka. Could you please describe your workflow when you are starting a new map steb-by-step?

My map is totally covered by 3785. Why the reference point is on a bound of 3785 - I can't know this. The reference point provided by world file generated by SAS Planet. Is this file invalid?
Prior to version 0.8.0 the transformations with this settings worked as I expected. Now it is not so. I really want to understand how, having a georeferenced template, without leaving home, properly to start a new map. Please help me.

EPSG 3785 you mention belongs to deprecated EPSG code which was wrongly defined, see Correct is 3857

Workflow with new project:

  1. Set coordinate system you want to use - here UTM 35 N.
  2. Locate approximate centre of future map in OpenStreetMap, in hyperlink you can see geographic coordinates in degrees
  3. Rewrite these coordinates into Geographic coordinates field (when typing UTM coordinates will also appear, map coordinates have 0,0 values all the time)
  4. It is not necessary but good to round up UTM coordinates to thousands (your grid will be compliant with 1 km UTM grid)
  5. Click Lookup to obtain declination. Fill the value and grivation is calculated.
  6. Done.

clipboard01

When opening georeferenced template in different coordinate system you must specify EPSG code. For your template use 3857.

Your file with new settings:
map_cleanFile.zip

Thanks a lot. I'll try in upcoming project.

One more question to @krticka: How did you determine that EPSG 3785 was wrongly defined?
This code appears in .jgw and .prj files
AUTHORITY["EPSG","3785"],
and this code was selected during template export from SAS Planet
selection manager_245
Suggestion about template exporting are also welcome.

@yevhenmazur I hope it is clear that how 3785 was wrong/deprecated and replaced by 3857 is not related to the issue you observed. I would really like to be sure that you understand what was wrong in the initial georeferencing:

  • You were mapping an area near 49°N 28°E. That is indeed the coordinates you see in Mapper, with UTM georereferencing. No problem.
  • You have a JPG template for this area, i.e. near 49°N 28°E, with a georeferencing (world file) in EPSG 3785 coordinates. No problem.
  • However, the georeferencing point - the point where Mapper aligns the paper coordinates with projected and geographic coordinates - is not in or near the mapped area (49°N 28°E), but at the north pole (90°N 27°E, the easting value is actually pointless). UTM and probably most projected coordinate systems don't work there, due to massive distortions. Mapper tries to calculate the alignment of templates in the vicinity of this point, and this is likely to fail.

However, changing the situation is easy. Write down the UTM or geographic coordinates for a particular point (object) in the map. Then in the georeferencing dialog, use "Pick on map" to select this point, then
enter the coordinates you wrote down before. Now you have what I called a reasonable reference point: one that is inside the mapped area.

I would really like to understand how you came to the initial georeferencing. I assume you know what you are doing, so there could be a real issue in Mapper.

I assume you know what you are doing

Now I'm not sure :)
You can repeat my steps described above to get initial georeferencing:

  1. Create new file
  2. Set map CRS as UTM 35 N
  3. Open attached template as for georeferenced map (Template CRS -> by EPSG -> 3785 (or 3857. I can't see the difference by eye))
  4. Use 'Show whole map' button to centre map on the template.
  5. Imagine that I drew a map over this template. That's it.

I tried to reproduce the problem as described above.
Template was opened, but UTM coordinates and Map coordinates stayed unchanged at 0,0. Coordinates in map (position of template) are then high, for example 40,378.09 363,264.50 (mm).

@yevhenmazur What means your note: Базові підложки стикаються у точці 80 857,57 726 548,00 (мм)?

I did the same as krticka before, with the same result.
Having high paper coordinates at the mapped area is likely to cause issues. For example, when exporting OCD, the coordinates must be within a 2m x 2m drawing area. So review your georeferencing step:

  1. Create new file
  2. Set map CRS as UTM 35 N

2.1. Leave the reference point map coordinates at 0,0 (you will draw near the center of the paper), but
2.2. Enter reference point projected or geographic coordinates (this moves the center of the paper into your mapped area).
2.3. (Optional) As suggested by krticka, modify the projected coordinates to friendlier values.


It is not straightforward to fix the map you have but doable if you want:

  1. Save the old map under a different file name ("XY"). Change this file's coordinate reference system to "Local". (This is needed to avoid the original problem!)
  2. Setup a new empty map with the same scale, loading "XY" as the symbol set. (This will make sure you retain your helper symbols.)
  3. Setup the desired georeferencing (UTM 35 N, projected or geographic reference point coordinates, declination).
  4. Open the map copy ("XY") as a template. If it is not visible immediately, you can use "Show whole map".
  5. Use "Import and remove" from the template's list "Edit..." menu.

What means your note: Базові підложки стикаються у точці 80 857,57 726 548,00 (мм)?

Where do you see this note? It is looks like to wrong Ukrainian translation. I can't say what is mean without the context.

I think it was in map notes.Dne 7. 4. 2018 7:24 odp. napsal uživatel Yevhen Mazur notifications@github.com:
What means your note: Базові підложки стикаються у точці 80 857,57 726 548,00 (мм)?
Where do you see this note? It is looks like to wrong Ukrainian translation. I can't say what is mean without the context.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

I think it was in map notes.

Ah, yes. It is not relevant for the original issue. I use large satellite images as a template. Very large images for this map. In order not to overload my Android device I divide these images to the parts. 80 857,57 726 548,00 - the point shared for all 4 parts.

@dg0yt, thank you! I've successfully fixed the map, using your instruction.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Abbe98 picture Abbe98  ·  9Comments

samlaminilepre picture samlaminilepre  ·  7Comments

ollesmaps picture ollesmaps  ·  7Comments

SwStef picture SwStef  ·  6Comments

Symbian9 picture Symbian9  ·  3Comments