create geotiff [message #56027] |
Tue, 25 September 2007 11:35  |
kerber_80
Messages: 6 Registered: September 2007
|
Junior Member |
|
|
Good day everyone !
can you help me with creating geoTIFF format.
I have image and geographic data but i can't understand how geoTIFF
created. what parameters is needed ???
|
|
|
|
Re: create geotiff [message #56089 is a reply to message #56027] |
Wed, 03 October 2007 12:37  |
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.")
|
|
|
Re: create geotiff [message #56093 is a reply to message #56027] |
Wed, 03 October 2007 10:02  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
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.")
|
|
|
Re: create geotiff [message #56094 is a reply to message #56027] |
Wed, 03 October 2007 09:54  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark Conner writes:
> Is your data in a regular lat/lon grid or some other projection? If
> in a regular lat/lon grid I can send a code snippet that will make a
> GeoTIFF that is recognizable in ArcMap.
Well, if it's just a cod snippet, how about letting the
rest of us have a look, too. :-)
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.")
|
|
|
Re: create geotiff [message #56097 is a reply to message #56027] |
Wed, 03 October 2007 09:41  |
Mark Conner
Messages: 9 Registered: September 2004
|
Junior Member |
|
|
On Sep 25, 1:35 pm, kerber...@yahoo.com wrote:
> Good day everyone !
>
> can you help me with creating geoTIFF format.
> I have image and geographic data but i can't understand how geoTIFF
> created. what parameters is needed ???
Is your data in a regular lat/lon grid or some other projection? If
in a regular lat/lon grid I can send a code snippet that will make a
GeoTIFF that is recognizable in ArcMap.
- Mark
|
|
|