3

I am using QGIS for vectorising some small-scale maps from a historical atlas. The maps are provided as JPEG images 3703 x 4718 ranging roughly from 5 to 9 MB in size. All georeferenced tiff images are roughly from 40 to 100 MB. But one. One of the maps, which is by no means remarkable and processed in exactly the same manner as the others results in a 5+ GB TIFF file which is nearly unmanageable.

What may be the cause of that?

Software details: QGIS 3.4.2-Madeira under Ubuntu 16.04.

Source image is imported as: "Unknown datum based on Bessel 1841 ellipsoid".

Transformation settings are: "Transformation type: Thin Plate Spline / Resampling method : Cubic / Target SRS: EPSG:4326 - WGS 84 / Compression: none"

2

By default I don't believe QGIS applies and type of lossy or lossless compression to exported images.

When you are ready to export the georeferenced image, there are some options available to begin compressing the images.

There is the compression option but seems a little limited and offers 4 options:

  • none
  • LZW
  • Packbits
  • Deflate

But it might be better to choose something like None, which will result in a large file, but this is a scratch dataset that you can consider disposing of if the next step is successful!

With the new large tiff in QGIS. You can right-click it and choose Export > Save As...

That opens the Save raster layer as... window and in there look for Create Options and place a checkmark there.

This will enable the profile settings which have some sane defaults like High Compression which I think is lossless and JPEG Compression which might be lossy.


Another culprit for the single tiff you have being so large is that it's extent is rather large and could be filling in with nodata or some other value.

  • The export parameters are the same for all files, I use "Compression: none" very consistently. Geometry of the neighbouring file is nearly the same (there are corners filled with black, but they are of similar proportions to those in other files). For some unknown reason, however, the smaller neighbour is converted to a 6684x3037 TIFF, while the bigger one to a 337868x5258 TIFF. I see no reason for this huge width... The TIFF, when loaded in QGIS as a raster layer, fits its position perfectly but renders very sllow. – Alexei Kouprianov Dec 14 '18 at 21:19
  • 1
    ah. k I suspected that with my last statement in the answer. so I would recommend maybe clipping the Raster to your desired extent or study area. Hard to say for sure why the extent change. I dont remember this being an issue pre Qgis 3 but did see it when re-projecting certain rasters. – SaultDon Dec 14 '18 at 21:30
  • Solved! Solved! Thank you! Your suggestion to pay attention to the file parameters made me to reconsider the graphical file dimensions. The extreme width of the file made me suspicious and I discovered a huge misprint in one of the 141 points (755.3261 East instead of 75.3261 East) which escaped my attention before. How stupid... ) – Alexei Kouprianov Dec 14 '18 at 21:35
2

Solved. The whole thing was caused by a huge misprint in the coordinates of one of the many points used for georeferencing (it was 755.3261 East instead of 75.3261 East).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.