Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have images which are already separated into JPEG compressed red, green, and blue bands. Is there a convenient way of using libgdal to pass in encoded bands without relying upon libgdal to perform the compression? Also, is it necessary that each band of a Tiff be of the same resolution? Due to the use of a Bayer pattern filter our red and blue bands have half the resolution of the green.

Thanks in advance.

share|improve this question
If the sensor collected the data with a Bayer pattern filter, then how did you create separate JPEGs for the three color bands? Wouldn't each color would have gaps in the pixel map associated with the other colors, and if so, how would you know how to piece the images back together again. If you demosaiced the image then all the colors would have the same (albeit non-native) spatial resolution. – Adam Wuerl May 25 '14 at 21:41

I would ask why you want to convert from your already processed JPEGs to TIFFs...

But that aside, technically, GeoTIFF bands can be of different types, but you might find no other software can deal with that, however all bands must be of the same resolution.

What you can do though is use Virtual Rasters, which are pretty flexible when it comes to data types and resolutions. The buildvrt tool will take your sources and create an XML-based wrapper around them. Although technically it can only have one resolution, it won't touch your source data, and GDAL will do the right thing when it comes to converting it to a renderable image.

share|improve this answer
Thanks for the tip, I will look at the the Virtual Rasters. My reason for using GeoTiff is to add meta data in the form of GCPs. I was not aware that such meta data fit well within the confines of EXIF. If you have a good example to point to I would be interested. – WhatTheGIS Feb 6 '12 at 17:03
That might work well then because VRTs are very metadata rich, so all your base imagery can stay as JPEGs, and the VRT can be used to wrap up all the extra stuff you need. There are EXIF geotags I think, but you're right, its not rich enough for your needs. – MerseyViking Feb 6 '12 at 19:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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