gvellut / FreehandRasterGeoreferencer

QGIS plugin for the interactive georeferencing of rasters
GNU General Public License v2.0
50 stars 13 forks source link

Raster location is wrong when reopen the project #53

Open Firefox86 opened 2 years ago

Firefox86 commented 2 years ago

Hi, Firstly, congrats for your development! I use your addon for 2 years now with a great pleasure. However, today I've discovered a problem never happened by now. I load a raster, I modify some parameters (rotation, scale, etc) ; everything is ok. I save then I close the project. When I reopen the same project, the raster is located at another place and the parameters are "weird". As you can see, X and Y scale are the same (which is no possible ; the original image is not homothetic), X & Y center are not correct as well --> the raster is located at the wrong place). Have you any idea? Thanks in advance, Eric

Infos about my QGis installation and project: QGis 3.22.0 Free hand raster: 0.8.3 SCR : IGNF:RGF93CC49 Raster: an jpeg image

image

Dkrav-UA commented 2 years ago

Check coordinate system when reopening. Also check if there is crs information inside file.

Firefox86 commented 2 years ago

Hi, thanks for your quick reply. When I reopen the SCR is unchanged (which is good). You ask me to check "if there is crs information inside file". Which file? Eric

Le 24/02/2022 à 18:10, Dkrav-UA a écrit :

Check coordinate system when reopening. Also check if there is crs information inside file.

— Reply to this email directly, view it on GitHub https://github.com/gvellut/FreehandRasterGeoreferencer/issues/53#issuecomment-1050071273, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3DA47WUQ4W2XN6W3RGHMTU4ZQ7BANCNFSM5PHZO2TA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

Dkrav-UA commented 2 years ago

Image file. Open this file in new (empty) project and check properties.

gvellut commented 2 years ago

Do you have a backup of the QGS / QGZ project file before you noticed this (or maybe you didn't save it after you opened it) ? It would be interesting to see what the values for the parameters of the plugins are (they are saved in the QGS / QGZ).

Also, did you save and reopen the project without issue before ? Or is it a new georeferencing that you saved but it is the first time you reopened it ?

It is a bit weird you are having this issue now since the plugin hasn't been updated in ~1 year. Did you update QGIS maybe ?

Firefox86 commented 2 years ago

Hi Guilhem, I've done a very simple procedure to reproduce the issue. See the pdf attached. Hoping that could help. Eric FreeHandRaster - issue #53 .pdf

gvellut commented 2 years ago

About that reporojection thing, the plugin does something if the projection is changed when using QGIS. But it shouldn't do anything when QGIS opens. Did you install QGIS 3.22 just recently ? I wonder if there is a change from there.

In the meantime, what you can do after georeferencing is export the raster to a standard QGIS raster. Then reimport it and delete the Freehand layer.

Firefox86 commented 2 years ago

I've installed 3.22 several months ago ; the issues has happened this week (Precisely, I've detected it this week).

Firefox86 commented 2 years ago

@gvellut: I've found a thing... If I set the Project SCR to WGS84/Pseudo Mercator, everything works fine (i.e. when I reopen the raster is at the right location). When I change the project SCR (without any other modification) then, when I reopen, the raster has moved far away... Hoping that could help. I've check this twice.

sbonaime commented 1 year ago

As I workaround for moving a geotif, here is my "solution" :

  1. Import the geotif using FreehandRasterGeoreferencer
  2. Move, rotate and scale as needed
  3. Export with only checked "Put rotation on Wordfile"
  4. Run this gdal line gdal_translate -of Gtiff exported_file.png new_geotiff.tiff
  5. Import the new_geotiff.tiff
  6. To remove black border, go to Image properties, Transparency and create a new line in the tab with 0 0 0 0 and 100