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

Home » Public Forums » archive » Create a GEOTiff image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Create a GEOTiff image [message #62300] Tue, 02 September 2008 02:48 Go to next message
titan is currently offline  titan
Messages: 59
Registered: March 2006
Member
Dear all,
I have 3 .txt files containig LAT, LONG, and Pressure.
Is there the possibility to create a GEOTiff image using IDL in order
to obtain a warped map of the datum (the pressure), depending on LAT
and LONG .txt files,that maintains geographic info?
I'm already able to project this data using the map tools of IDL but
my output is "only" a .png file without any geographic informations..

thanks to everybody

B.
Re: Create a GEOTiff image [message #62364 is a reply to message #62300] Wed, 03 September 2008 13:07 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
titan writes:

> I have 3 .txt files containig LAT, LONG, and Pressure.
> Is there the possibility to create a GEOTiff image using IDL in order
> to obtain a warped map of the datum (the pressure), depending on LAT
> and LONG .txt files,that maintains geographic info?
> I'm already able to project this data using the map tools of IDL but
> my output is "only" a .png file without any geographic informations..

In principle, creating a GeoTiff file is as straightforward
as it gets. Just create a structure with the proper GeoTiff tags
in it, filled out with the proper values, and pass it along with
the image to the WRITE_TIFF routine via the GEOTIFF keyword.

Of course, you will get *no* help from IDL filling out the
tags properly, nor will you learn which tags you probably
need (and they will vary somewhat from one projection to another,
etc.). You will have to get this information elsewhere, probably
on one of the GeoTiff web pages:

http://www.remotesensing.org/geotiff/geotiff.html

Here is an example we have used around here:

g_tags = { ModelPixelScaleTag: [ 25000.d, 25000.d, 0d ], $
ModelTiepointTag: [0d, 0d, 0d,-3850000.d,5850000.d, 0 ], $
GTModelTypeGeoKey: 1s, $ ; (ModelTypeProjected)
GTRasterTypeGeoKey: 1s, $ ; (RasterPixelIsArea)
GeographicTypeGeoKey: 32767s, $ ; (user-defined)
GeogGeodeticDatumGeoKey: 32767s, $ ; User-Defined
GeogLinearUnitsGeoKey: 9001s, $ ; Linear_Meter
GeogAngularUnitsGeoKey: 9102s, $ ; Angular_Degree
GeogSemiMajorAxisGeoKey: 6378273.0d, $ ;
GeogSemiMinorAxisGeoKey:6356889.449d, $ ;
ProjectedCSTypeGeoKey: 32767s, $ ; User-Defined
ProjCoordTransGeoKey: 15s, $ ; CT_PolarStereographic
ProjLinearUnitsGeoKey: 9001s, $ ; Linear_Meter
ProjNatOriginLatGeoKey: 70.d, $ ;
ProjFalseEastingGeoKey: 0d, $ ; 0
ProjFalseNorthingGeoKey: 0d, $ ;
ProjCenterLongGeoKey: -45.0d, $
ProjCenterLatGeoKey: 90.0d $
}
(Don't copy the actual values here, they will have to match YOUR
map projection, etc. This is just to give you the flavor of the
problem.)

Once you have the tags filled out properly, you just write the
geoTIFF file:

WRITE_TIFF, 'example_geotif.tif', image, /float, geotiff=g_tags

GeoTiff files do have one significant problem that complicates our
lives here at the Snow and Ice Data Center. They assume that the
datum you use to specify the latitude and longitude values of your
data is identical to the ellipsoid you are going to use for your
map projection (normally WGS84). Unfortunately, that is not always
the case. Here, we use a spherical datum to create our lat/lon values,
and the WGS84 ellipsoid to project the data into a map projection.
Thus, we have to use little known keywords to proj.4 to do
a datum transformation, before we can project the data and create
a GeoTiff file. As far as I know, datum transformations are
not possible in IDL, although a 3-point datum transformation is
possible in ENVI. proj.4 uses the standard 7-point datum transformation.

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Create a GEOTiff image [message #62366 is a reply to message #62300] Wed, 03 September 2008 12:05 Go to previous messageGo to next message
jeffnettles4870 is currently offline  jeffnettles4870
Messages: 111
Registered: October 2006
Senior Member
On Sep 2, 5:48 am, titan <thunder...@inwind.it> wrote:
> Dear all,
> I have 3 .txt files containig LAT, LONG, and Pressure.
> Is there the possibility to create a GEOTiff image using IDL in order
> to obtain a warped map of the datum (the pressure),  depending on LAT
> and LONG .txt files,that maintains geographic info?
> I'm already able to project this data using the map tools of IDL but
> my output is "only" a .png file without any geographic informations..
>
> thanks to everybody
>
> B.

Try this to help you get started:

http://www.dfanning.com/map_tips/ptsource.html
Re: Create a GEOTiff image [message #62403 is a reply to message #62300] Mon, 08 September 2008 07:11 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
titan writes:

> I was also thinking about another way (hopefully not a stupid one):
> are you aware if it's possible to create geographic lookup tables
> (GLT's) in IDL?
> My idea is the following: combining the image file of the map with the
> GLT
> for creating georeferenced images

I think MAP_PATCH and MAP_PROJ_IMAGE have beat you to it. :-)

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 a GEOTiff image [message #62404 is a reply to message #62364] Mon, 08 September 2008 07:04 Go to previous message
titan is currently offline  titan
Messages: 59
Registered: March 2006
Member
Dear David,
thank you for your suggestion.
I was also thinking about another way (hopefully not a stupid one):
are you aware if it's possible to create geographic lookup tables
(GLT's) in IDL?
My idea is the following: combining the image file of the map with the
GLT
for creating georeferenced images

Thank you in advance.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: fit image to logarithmic color bar
Next Topic: converting a string to an IDL command

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

Current Time: Wed Oct 08 15:22:48 PDT 2025

Total time taken to generate the page: 0.00597 seconds