Bug report #7430

"target crs" in georeferencer does not work

Added by Giovanni Manghi almost 12 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:C++ plugins/Georeferencer
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:16392

Description

regardless what the user chooses, the actual CRS of the georeferenced image is the project one. Too bad that gdalinfo shows that the CRS is the one choosed in "target crs", but it is wrong.

History

#1 Updated by Larry Shaffer over 11 years ago

Hi Giovanni,

I can't replicate issue here, on Mac. Which CRS dialog are you setting the CRS in? The one that may pop up while loading a raster, or the one in the settings?

#2 Updated by Giovanni Manghi over 11 years ago

  • Priority changed from Normal to High

Larry Shaffer wrote:

Hi Giovanni,

I can't replicate issue here, on Mac. Which CRS dialog are you setting the CRS in? The one that may pop up while loading a raster, or the one in the settings?

Hi Larry, I still confirm the issue. Here the steps

  • new project
  • added a base map in a projected crs (so the project has the same crs)
  • open the georeferencer
  • load the raster to georeference
  • manually add the GCP
  • open the "transformation settings" dialog
  • fill the option and in "target CRS" choose a CRS (ex: 3857) different from the one of the base map/project
  • run the georeferencer
  • the georeferenced map is added to the project but does not show:
    internally it was given the CRS defined in "target CRS" but the truth is it has the base map/project CRS. This you can easy check by manually changing the CRS of the georeferenced map, and this it will overlap in the right place.

Now that I think better I'm going to raise the priority of this ticket as the tool creates wrong data and misleads the user.

#3 Updated by Larry Shaffer over 11 years ago

Giovanni Manghi wrote:

Hi Larry, I still confirm the issue. Here the steps

  • new project
  • added a base map in a projected crs (so the project has the same crs)
  • open the georeferencer
  • load the raster to georeference

In between these steps, are you not presented with a 'define CRS' dialog? It not, you may have your Options -> CRS 'CRS for new layers' set to 'Use project CRS.' If this is the case, try setting it to 'Prompt...' instead.

When the prompted dialog comes up, choose the appropriate output CRS, and also define it in the Georeferencer's settings. See if that will produce a valid raster file.

Even when setting the Options -> CRS 'CRS for new layers' set to 'Use project CRS,' I was not able to reproduce your issue. So, I can't test whether my idea for a fix will work. I have not looked at the code yet, but think the assignment of CRS for new layers may be interfering with that defined in the Georeferencer's settings (not confirmed).

  • manually add the GCP

By 'manually' do you mean keyboard input of GCPs or by clicking on the map?

  • open the "transformation settings" dialog
  • fill the option and in "target CRS" choose a CRS (ex: 3857) different from the one of the base map/project
  • run the georeferencer
  • the georeferenced map is added to the project but does not show:
    internally it was given the CRS defined in "target CRS" but the truth is it has the base map/project CRS. This you can easy check by manually changing the CRS of the georeferenced map, and this it will overlap in the right place.

Now that I think better I'm going to raise the priority of this ticket as the tool creates wrong data and misleads the user.

#4 Updated by Giovanni Manghi over 11 years ago

In between these steps, are you not presented with a 'define CRS' dialog? It not, you may have your Options -> CRS 'CRS for new layers' set to 'Use project CRS.' If this is the case, try setting it to 'Prompt...' instead.

When the prompted dialog comes up, choose the appropriate output CRS, and also define it in the Georeferencer's settings. See if that will produce a valid raster file.

Even when setting the Options -> CRS 'CRS for new layers' set to 'Use project CRS,' I was not able to reproduce your issue. So, I can't test whether my idea for a fix will work. I have not looked at the code yet, but think the assignment of CRS for new layers may be interfering with that defined in the Georeferencer's settings (not confirmed).

Hi Larry, I always use QGIS configured with "prompt for CRS", but in case of the georeferencer I believe that this is a bug. The user is not laoding a raster in the canvas and the same layer is not expected anyway to have any kind of CRS (are have it wiped off if it has one, and I remember that there was an issue also in this case).

This is bug #4377

On the other hand if you leave the "target crs" blank I would expect to have the raster georeferenced with the project CRS, but it doesn't, see #7432

  • manually add the GCP

By 'manually' do you mean keyboard input of GCPs or by clicking on the map?

clicking on map

cheers!

#5 Updated by Giovanni Manghi over 10 years ago

  • Target version set to Version 2.4

#6 Updated by Jürgen Fischer over 10 years ago

  • Target version changed from Version 2.4 to Future Release - High Priority

#7 Updated by Jürgen Fischer over 10 years ago

  • Category changed from C++ Plugins to C++ plugins/Georeferencer

#8 Updated by Giovanni Manghi almost 8 years ago

  • Priority changed from High to Normal

#9 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#10 Updated by Giovanni Manghi almost 6 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF