qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

Georeferencer places images in wrong part of the world. #51197

Closed Jimzi closed 1 year ago

Jimzi commented 1 year ago

What is the bug or the crash?

Georeferencing an already georeferenced image that is slightly misalinged places it in a completely different part of the world.

Steps to reproduce the issue

0- Open QGIS 3.28.1-Firenze 1- From the Layer Menu, Open Georeferencer 2- Load an already georeferenced raster. 3- Create some GCPs on the raster and select their final location from the Canvas. 4- Transformation Type: Thin Plate Spline, Resampling Method: Nearest Neighbor, Target SRS: EPSG:32636 (which is the same as the raster itself and the project). 5- Start the georeferencer.

The georeferencer completes its task but the image doesn't show on the map. When I select its layer and select Zoom to Layer, it shows up in the middle of the jungle in Congo.

Performing the same procedure in 3.24.3-Tisler places it in the right spot with no issues.

Versions

QGIS version 3.28.1-Firenze QGIS code revision fde3b8fbb8c Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.6.0 PROJ version 9.1.0 EPSG Registry database version v10.074 (2022-08-01) GEOS version 3.11.1-CAPI-1.17.1 SQLite version 3.39.4 PDAL version 2.4.3 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009

Active Python plugins actions_for_relations 1.2.0 AppendFeaturesToLayer 1.2.0 geometry_paster 0.1.1 mmqgis 2021.9.10 pluginbuilder3 3.2.1 plugin_reloader 0.9.2 qad 3.0.4 qfieldsync v4.2.0 qtoof_recorder 0.1 QWater 3.1.8 refFunctions 1.6 Submission 0.7 VectorBender 0.2.1 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99

Supported QGIS version

New profile

Additional context

No response

nicogodet commented 1 year ago

Can you provide raster and GCP points to reproduce ?

abreufilho commented 1 year ago

I am having the same problem. Seems something in the decimal places. Rasters are always moved to pixel spatial reference instead of projected coordinates.

nicogodet commented 1 year ago

@abreufilho

Can you provide raster and GCP points to reproduce ?

abreufilho commented 1 year ago

@abreufilho

Can you provide raster and GCP points to reproduce ?

Unfortunately i cant. Client's private overhead imagery.

I had to reproject my original raster from EPSG:31983 (UTM proj.) to EPSG:4326, georreference it and converted back to UTM.

roya0045 commented 1 year ago

So the issue occurs if the crs of the origin is the same as the GCP and the destination?

Jimzi commented 1 year ago

Can you provide raster and GCP points to reproduce ?

Sure, its a 209MB file though, I am uploading it to Google Drive if thats ok? Will send you a link once done.

Babithaganesh commented 1 year ago

I do have same problem, it is getting displayed in different part of the world after geo-referencing..Any solution?

antoniolocandro commented 1 year ago

So the issue occurs if the crs of the origin is the same as the GCP and the destination?

This happened to me recently, if everything was in the same PCS e.g. UTM it did not georeference correctly. Do not know if related to this issue itself but since you asked I can confirm it did happened to me. I can't provide the source data unfortunately.

Lugal-PCZ commented 1 year ago

I'm experiencing the same issue. Depending on the transformation type used, the output is variously complete, clipped, or blank and always misplaced to somewhere in South America or off its western coast, instead of New York State. Tested with version 3.28.2-Firenze running on Mac OS 13.1 and version 3.28.1-Firenze on Windows 11. Orthophoto and Points File.zip

agiudiceandrea commented 1 year ago

Thanks @Lugal-PCZ. Issue confirmed on Windows using QGIS 3.28.2. The issue doesn't occur using QGIS 3.22.

MrChebur commented 1 year ago

Current workaround is:

  1. Delete the image georeference information.
  2. Set the project CRS to WGS 84.
  3. Perform image georeferencing.

Test data.zip