mapper icon indicating copy to clipboard operation
mapper copied to clipboard

Georeferencing dialog ideas

Open pkturner opened this issue 5 years ago • 8 comments

Steps to reproduce

  1. An existing map
  2. Use the Georeferencing dialog to change its declination.
  3. See a question, "Do you want to rotate the map content accordingly, too?"
  4. See a dialog. Where should it rotate around? Should the georeferencing reference point be adjusted?
another use case
  1. An existing map
  2. Use the Georeferencing dialog to change its reference point.
  3. Observe the geographic coordinates of objects.

Actual behaviour

The dialog is awkward for adjusting existing maps. Usually with existing maps, the geolocations of objects must be preserved. The dialog upsets this property, because its essence is to set or change the geographic coordinates that correspond to the map. Only after the user clicks OK, a careful user can restore the geolocations by handling a question that pops up, and a dialog with several options that pops up.

If the reference point coordinates are changed, the geographic coordinates of objects are affected.

Expected behaviour

A way to revise georeferencing parameters that promises not to touch the geolocations of map objects.

Configuration

Mapper Version: 0.9.4
Operating System: Gentoo Linux

Prototype

I created a prototype of user interface ideas, and have uploaded the branch pkturner:georeferencing-dialog so that others can try them out. The changes are most visible as

  • The Georeferencing dialog is replaced by
    • “Set georeferencing” dialog – CRS, reference point, declination, scale factor
      Defining the geolocations of map objects
    • “Recast reference system” dialog – CRS and reference point
      Adjustments with no effect on the map, and zero or minimal effect on the geolocations of map objects
    • “Realign map” dialog – scale, declination, and map reference point
      Preserving the geolocations of map objects, with corresponding rotation and scaling of the ensemble of objects on the map
  • The Georeferencing dialog provides a choice of two aspects of control: by geographic parameters, or by projected parameters. In the latter case the user can directly edit grivation.
  • The Realign map dialog generalizes and replaces the “Change map scale” dialog.
  • The user must explicitly set the declination and geographic reference point (except in -local- mode).
  • Basic map dialogs:
    • Rotate all objects – renamed
    • Scale all objects – added
    • Shift all objects– added
  • Instead of user control over the center of rotation, etc. the content of the map window and print area are automatically kept centered where they were (Realign map dialog).

There are many more details and ideas in the prototype beyond the above. I wanted to point to potential improvements rather than just describe how the georeferencing worked poorly for me when a beginner, or just suggest changes with no experience to back them up. The prototype dialogs are all implemented, so go ahead and see what they do.

I'll follow up with some screenshots from the prototype, and possibly describe common use cases or explain prototype details. I would be happy to adapt this prototype code or any small piece of it into a Mapper PR, adding tests, etc.

pkturner avatar Aug 16 '20 20:08 pkturner

The prototype's Map menu, and its "Set georeferencing", "Recast reference system", and "Realign map" dialogs map_menu set_dialog_geo_mode recast_dialog align_dialog

pkturner avatar Aug 16 '20 20:08 pkturner

The latitude/longitude and declination fields show "no value" until the user sets them. set_dialog_clear_geo_mode

pkturner avatar Aug 16 '20 20:08 pkturner

I didn't have much time to review the proposal. IMO we either need to simplify the dialog radically, or provide a separate minimal dialog: It must be usable on a mobile phone. This means there should be only two columns: labels and input fields (QFormLayout).

With the automatism we already have, the key points are just that:

  • the projected CRS by EPSG (not necessarily only by number: using PROJ's database, we have a name to display and to look for).
  • the reference point, as take from some "current" source (map or new template)
  • the declination

dg0yt avatar Sep 14 '20 05:09 dg0yt

PS: Nice style and B/W icons on this screenshot, wrt to mobile usage. What enviromnent is this?

dg0yt avatar Sep 14 '20 05:09 dg0yt

The screenshots are from KDE Plasma in the Breeze style (Linux).

I take the "Rotate map" dialog as a good example of "only two columns: labels and input fields". Is that available on mobile now? I have not found Mapper's menu bar on my 11cm x 17cm Samsung tablet.

simplify the dialog radically, or provide a separate minimal dialog

Yes! 90% of what users do with georeferencing can be simple. It's tough to get the UI right, because of the number of georeferencing parameters, and because the parameters need to be coordinated in particular ways depending on the user's intent.

It's possible to automatically generate a very adequate georeferencing just knowing the map's latitude and longitude, using an orthographic or stereographic projection with WGS84 datum, and looking up the declination online. Then for excellent accuracy the user just needs to set a CRS that matches their LiDAR template, and possibly refine the declination. The most direct path to a solid georeferencing as you mention "take from ... new template" which can provide both CRS and reference point.

pkturner avatar Sep 14 '20 15:09 pkturner

I updated the branch containing these changes pkturner:georeferencing-dialog, rebasing them on the georef-state branch (#1753). Use of the Georeferencing::Geospatial state supersedes a helper function which I had introduced in the original version of georeferencing-dialog.

The dialog features demonstrated by the code are unchanged.

pkturner avatar Oct 31 '20 01:10 pkturner

I really wanted to use std::optional<double> declination rather than bool has_declination and held back on that because optional is a C++17 feature, not endorsed for use in Mapper.

This supports the georeferencing dialogs in indicating to the user when declination and/or reference point need to be set.

pkturner avatar Oct 31 '20 01:10 pkturner

IMO we either need to simplify the dialog radically, or provide a separate minimal dialog: It must be usable on a mobile phone. [...] the key points are just that:

* the projected CRS by EPSG (not necessarily only by number: [...]).
* the reference point, as take from some "current" source (map or new template)
* the declination

I was going to upload a few updates to my prototype, when I reread these comments by @dg0yt. I agree that simplification is possible.

The reference point also need not appear in the dialog. It serves limited purposes.

purpose dispensability
To locate the map coordinate axes in relation to projected coordinates. It's rare that this makes a difference to the user.
To help define the transformations between map and projected coordinates. Either the map or projected coordinates of the reference point can be chosen arbitrarily, with negligible effect.
To calculate the convergence, so the declination provided by the user can determine the grivation that orients the map. The variation in convergence over the extent of an orienteering map is negligible.
To calculate the declination. The variation in declination over the extent of an orienteering map is negligible.

I suggest that the projected and map coordinates of the reference point be set automatically, either

  • when the first map object is added to a georeferenced map, or
  • when a CRS is assigned to a map that already has objects

positioning the reference point in the vicinity of the map objects.

pkturner avatar Feb 12 '21 17:02 pkturner