1

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.

1
  • 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
    Commented May 25, 2014 at 21:41

1 Answer 1

1

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.

2
  • 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
    Commented Feb 6, 2012 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. Commented Feb 6, 2012 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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