Skip to content

Estimate Target CRS type and parameters in Georeferencer #64501

@wolfgangr

Description

@wolfgangr

Feature description

It would be great to estimate CRS parameters, as far as they control distortion, e.g. lon_0, lat_1, lat_2 for equidistant conic or lat_0, lon_0 for azimuthal Systems, in the context and workflow of the QGIS Georeferencer UI.

It would be even greater to have some automagic or assisted interactive selection of the best type of CRS, may be from a limited set (e.g. conic, azimuthal, Aitoff, Winkel...), that best meets a given scan of a (e. g. historical) map in terms of (e.g.) least square deviation.

Additional context

Currently, I'm working on a collection of historical maps.
To understand history, changes of geographical relations in course of time and from different thematic perspectives are paramount, leaving QGIS as the first tool of choice to align and manage large collections of layered maps.

There's a plethora of scanned prints available e.g. at archive.org, at wikipedia etc, many of them in the public domain.
As early as of End of 19th century, most of professional atlases appear to use precise CRS, but not citing them correctly.
Only by accident I found one atlas informing of using equidistant conic and providing lat_1, lat_2, leaving lon_0 to be (easily) guessed visually.

Maps spanning a couple of deg show little distortion and can easily projected by helmert, central Europe by 1st degree poly etc.
For total Europe, 2nd degree polynoms can't correct misaligned conic CRS, while 3rd degree polynoms require many points and still introduce heavy distortions at the edges.
But when it comes to Eurasia, wrapping around half the world, even 3rd degree ploynomials cannot correct a misaligned CRS any more.

Beyond that, 3rd degree polynoms are fine to correct distortions from two-page-scans at the spine of the book - but only if the distortion of a misaligned CRS does not "eat up" the freedom required to do so.
Thin plate splines appear to generate at least as much deviations as they solve and require a large number of matching points.

I spent quite some time to understand projections and develop some feeling for them, to increase my hit rate in "CRS guessing". Just to get creedy for even more maps :-). So I was looking for a more efficient, precise and systematic approach.

Right now, I try to hack a script to use Levenberg-Marquardt algorithm, employing least-square optimisation to automagically find the best CRS parameters matching a given set of points from a georeferencerers *.point file.

Sad to say, I'm neither well trained in python, nor in QGIS integration, nor in QT gui stuff. I beg pardon to do this in PERL instead, using PDL::Fit::Levmar and Geo::LibProj::cs2cs libraries.

So, when it works, I'll publish it on github and hope that it may at least serve as proof of concept and kind of pseudocode. I'm sure that libproj and Levenberg-Marquardt are availible in python as well. And I promise to try my best to keep it readable and to avoid weird PERL tricks as far as possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions