comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » create geotiff
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: create geotiff [message #56089 is a reply to message #56027] Wed, 03 October 2007 12:37 Go to previous messageGo to previous message
Mark Conner is currently offline  Mark Conner
Messages: 9
Registered: September 2004
Junior Member
The cod snippet you'll get in snail mail. (Snails? Cod? Sounds
vaguely French......)

Anyway, here's the code snippet.

;maxlat = maximum latitude of grid
;minlat = minimum latitude of grid
;maxlat,maxlon = same for longitude
;image = byte array to be written to Geotiff
;xsize = # columns in image
;ysize = # rows in image
;outfile1 = output filename

scale = double([(maxlon-minlon)/xsize, $
(maxlat-minlat)/ysize, $
0.0])

tiepoints = double([xsize/2.0,ysize/2.0,0.0,(maxlon+minlon)/2.0,
(maxlat+minlat)/2.0,0.0])

gtiff = {modeltiepointtag: tiepoints, $
modelpixelscaletag: scale, $
gtmodeltypegeokey: 2, $ ; Geographic model type
geographictypegeokey: 4326, $ ; WGS84
gtrastertypegeokey: 1} ; pixel represents an
area

write_tiff, outfile1,reverse(image,2),comp=2,geotiff=gtiff ;
reverse may not be necessary for your images

- Mark

----
Mark D. Conner
Sr. Staff Scientist
Atmospheric & Environmental Research, Inc.


On Oct 3, 12:02 pm, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> Well, if it's just a cod snippet, how about letting the
>> rest of us have a look, too. :-)
>
> Whoops! I guess a cod is something different. I would like
> to see the code, however. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: dynamic widget
Next Topic: Rotating axis labels

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Nov 29 09:59:35 PST 2025

Total time taken to generate the page: 0.40178 seconds