[gdal-dev] Questions about processing four band (RGBI) imagery

Jonathan Moules jonathanmoules at warwickshire.gov.uk
Wed May 28 07:35:39 PDT 2014


Hi List,
  I have four band (RGB plus Infrared) imagery from some aerial photography
we've had flown. I've already used GDAL to create suitable optimised RGB
GeoTIFFs using this data and now want to do it with the Infrared band too.

The RGBI data is about 1TB uncompressed, currently stored as 2732 GeoTIFF
tiles compressed with LZW:

Files: SK1400.tif
>        SK1400.tfw
> Size is 8000, 8000
> Coordinate System is:
> PROJCS["OSGB 1936 / British National Grid",
>     GEOGCS["OSGB 1936",
>         DATUM["OSGB_1936",
>             SPHEROID["Airy 1830",6377563.396,299.3249753150316,
>                 AUTHORITY["EPSG","7001"]],
>             AUTHORITY["EPSG","6277"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4277"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",49],
>     PARAMETER["central_meridian",-2],
>     PARAMETER["scale_factor",0.9996012717],
>     PARAMETER["false_easting",400000],
>     PARAMETER["false_northing",-100000],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","27700"]]
> Origin = (414000.000000000000000,301000.000000000000000)
> Pixel Size = (0.125000000000000,-0.125000000000000)
> Metadata:
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   COMPRESSION=LZW
>   INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  (  414000.000,  301000.000) (  1d47'35.68"W, 52d36'22.49"N)
> Lower Left  (  414000.000,  300000.000) (  1d47'35.83"W, 52d35'50.12"N)
> Upper Right (  415000.000,  301000.000) (  1d46'42.51"W, 52d36'22.40"N)
> Lower Right (  415000.000,  300000.000) (  1d46'42.68"W, 52d35'50.03"N)
> Center      (  414500.000,  300500.000) (  1d47' 9.18"W, 52d36' 6.26"N)
> Band 1 Block=8000x32 Type=Byte, ColorInterp=Red
> Band 2 Block=8000x32 Type=Byte, ColorInterp=Green
> Band 3 Block=8000x32 Type=Byte, ColorInterp=Blue
> Band 4 Block=8000x32 Type=Byte, ColorInterp=Undefined
>
>

My goal is to create a mosaiced GeoTIFF image with all four bands in it. It
should be as small as possible without serious quality degredation.


I've got some some questions as a result of my experiments so far:


   - "-co PHOTOMETRIC=YCBCR" - in gdal_translate this will fail saying it
   only works with 3 bands. Yet with gdaladdo, compressing overviews with
   "--config PHOTOMETRIC_OVERVIEW YCBCR" works fine (or at least gives no
   errors). Any reason for this?
   - Is there any special compression to use for four band imagery as I
   can't use YCBCR?
   - What's the best way to process the data? I'm using:

gdal_translate aerial.vrt aerial.tif -of GTiff -co BIGTIFF=YES -co
> TILED=YES -co blockxsize=512 -co blockysize=512 -co COMPRESS=JPEG -co
> JPEG_QUALITY=50 -a_srs EPSG:27700
> gdaladdo aerial.tif -r average --config COMPRESS_OVERVIEW JPEG --config
> JPEG_QUALITY_OVERVIEW 50 --config INTERLEAVE_OVERVIEW PIXEL --config
> PHOTOMETRIC_OVERVIEW YCBCR 2 4 8 16 32


   - How do I get GDAL to *not *set Band 4 to "Alpha" (which is what the
   above does).

Using GDAL 1.10.1

Thanks,
Jonathan

-- 
This transmission is intended for the named addressee(s) only and may 
contain confidential, sensitive or personal information and should be 
handled accordingly. Unless you are the named addressee (or authorised to 
receive it for the addressee) you may not copy or use it, or disclose it to 
anyone else. If you have received this transmission in error please notify 
the sender immediately. All email traffic sent to or from us, including 
without limitation all GCSX traffic, may be subject to recording and/or 
monitoring in accordance with relevant legislation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140528/05a499c8/attachment.html>


More information about the gdal-dev mailing list