gvellut / FreehandRasterGeoreferencer

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

Image width and height are shown as 0 for large tiff files #48

Open DavidBenYosef opened 2 years ago

DavidBenYosef commented 2 years ago

Is there some file dimension limit to use this plugin? I am trying to use the plugin to georeference large tiff file (35764 X 24967 pixels), but when loading the file it is not presented and I see in layer settings that Width and Height are shown as 0. I cropped the tiff file using Photoshop to 23733 X 13184 pixels and with this size it is working fine. Verified the same behavior on another computer with more RAM and CPU, so I dont think it is a memory related issue.

gvellut commented 2 years ago

Yes. There is a limit in Qt (which is used to read all the raster into memory at once): Here it is written to be a size of 32767x32767 (although it has been lifted in Qt6). The fix would be to not use Qt to read the rasters at once in memory but GDAL to read the necessary parts of the raster for rendering or the pyramids.

I guess adding some kind of warning when that happens could be done easily.