[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing geotiffs with IDL

Hi John,
I have written an application that processes our ADAR1000 digital camera
sysem images - it interpolates the raw Kodak DCS460 data, performs a
vignette correction to correct for the lens falloff, performs a BRDF
correction and finally links in the GPS data. The GPS data gives location in
WGS84 latitude and longitude although I convert this to WGS84 UTM (called
'easting', 'northing' and 'zone' below). The elevation data is used to
derive the Pixel size (called 'gre' below). I derive a heading from the GPS
data and use the negative of this as the angle through which the image must
be rotated to align north south (called 'rotangle' below). The user can do
one of two things, either chose that the image be rotated north-south (I use
ROT after putting the image into a larger array), or leaving the image as it
is and defining a transformation matrix in the GeoTiff Tags.
Here is a subset of the code:

if transformNS eq 'Yes' then begin

    ; Snip
    ; outputimage is rotated using rotangle to grid North-South here !
    ; Snip

    ; Create the GeoTiff Structure for the North-South data


endif else begin

    ; Create a the model transformation matrix
    ; Note Image size is 3064*2040 pixels so the diagonal is 1840.5 pixels


    ; Create the GeoTiff Structure for the unrotated data


; Put a bit more info into the geotiff structure here

; Write the geotiff file
write_tiff, filename, outputimage, GEOTIFF=geo

Its all a little messy since it's one of those jobs that just grew, but it
works a treat. Just remember to use the correct variable type. Note that the
model transformation tag is not baseline geotiff, so some platforms will not
support it (like Arcview). However the latest versions of ENVI and ERDAS
Imagine seem to like it. I got all the tag information from:

Let me know how you go,

Peter Scarth
Biophysical Remote Sensing Group
Department of Geographical Sciences & Planning
University of Queensland
Brisbane, Queensland, AUSTRALIA, 4072
Ph: 61-7-33656534 Fax: 61-7-33656899

"John Brock" <jbrock@cfcg.er.usgs.gov> wrote in message
> Does anyone have an example IDL procedure that writes geotiff files?  We
> are trying
> to figure out how to define the numerous geotiff tags for lidar-based
> elevation images,
> and have not been able to find an example.
> Thanks for any help,
> John Brock