[GIS] What format and settings to use for aerials photos in QGIS

aerial photographyecwgdaljpeg 2000qgis

Following question which was more about handling Aerials with ArcGIS:

Most Effective Format to Manage Aerial Photography for Viewing Only

It seems there are 2 major options for storing / resampling / reprojecting etc. aerials:

  1. JP2000 / JP2 / JPEG 2000 (recently 5 codes for GDAL handling)
  2. ECW (ERDAS Compressed Wavelets (.ecw))
  3. any other I missed?

gdal available formats

What I have understood depending on QGIS version for both there usually has to be installed some additional libraries. ECW has some limitation – for compressing needs to buy licence?

I tested jpeg which I can't use for big files (max dimension limitation) and it is also slow with bigger dimensions.

The answer should contain:

  1. What is available by default with QGIS 2.0.1 desktop and/or OSGEO?
  2. How it works with big files – zooming in/out (pyramids)?
    • is Creation OptionsRESOLUTIONS for jp2 pyramids?

Best Answer

Based on huckfinn answers, few other comments and together with my findings:

Winning format is JPEG2000 (why and which version is mentioned below Why not others)

Why not others:

  1. JPEG
    • Size limitation both data size and dimensions (4GB and 65500x65500)
    • no (internal) pyramids possibility = bigger the image the longer it takes to display it when pan/zoom in/ zoom out
  2. GeoTIFF
    • Good for grids but for raster imagery there is no effective lossy compression except JPEG = same problem as JPEG
  3. ECW and Mr. SID
    • You need special licence to be able to save in ECW and Mr. SID - you can't do that by default with GDAL (QGIS). If you have special licence, you probably don't need to read this answer because processing imagery is your daily bread (our company usually gets imagery in ECW format from our clients)
  4. Database / Map server
    • It is definitely good option if you have already some database / Map server running or at least know how to do it easily and fast. In that case data can be saved in GeoTIFF or whatever and are send usually as JPEG to your client - web browser or Desktop software like QGIS. But if you don't have server and want something easy to load/see imagery easily in QGIS, it is too complicated.

WHY JPEG2000:

As I have posted in my Question - GDAL provides more options to save in JPEG2000 format but as listed on GDAL website non of it should be provided in default version of GDAL. I tried probably 6 different versions of QGIS while testing and all of them had at least one JPEG2000 option (on Windows 7). To make sure I suggest to install OSGeo4W (32 or 64 bit) version of QGIS and check in OSGeo4W shell if any JPEG2000 code is available. (on Windows just run OSGeo4W shell from start menu/programs and write there command gdal_translate --formats or gdalwarp --formats).

In all versions of QGIS I tried there was JP2OpenJPEG code (OpenJPEG library (v2)) available. And after some longer testing including others I found that one the most handy.

Advantages of JP2OpenJPEG

  • free to use for open/save
  • no "small" size limit (defintely can go way above 65500x65500)
  • very effective compression (possible to set %)
  • includes pyramids (previews) for fast viewing (also possible to set)

(options to set compression (-co QUALITY), pyramids (-co RESOLUTIONS) and some more - http://www.gdal.org/frmt_jp2openjpeg.html)

Simple example of conversion in QGIS using gdal_translate (in QGIS go to Raster/Converion/Translate, set whatever you need and possibly click on edit button to adjust the command to fit your needs):

gdal_translate -of JP2OpenJPEG -co QUALITY=10 srcGridOrImage image.jp2  
Related Question