Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raster location is wrong when reopen the project #53

Open
Firefox86 opened this issue Feb 24, 2022 · 9 comments
Open

Raster location is wrong when reopen the project #53

Firefox86 opened this issue Feb 24, 2022 · 9 comments
Labels

Comments

@Firefox86
Copy link

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
Copy link

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

@Firefox86
Copy link
Author

Firefox86 commented Feb 24, 2022 via email

@Dkrav-UA
Copy link

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

@gvellut
Copy link
Owner

gvellut commented Feb 24, 2022

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 ?

@gvellut gvellut added the bug label Feb 24, 2022
@Firefox86
Copy link
Author

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
Copy link
Owner

gvellut commented Feb 25, 2022

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
Copy link
Author

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

@Firefox86
Copy link
Author

Firefox86 commented Mar 7, 2022

@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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants