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

Home » Public Forums » archive » Write a GeoTiff
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
Write a GeoTiff [message #88549] Mon, 12 May 2014 12:24 Go to next message
lhashemi is currently offline  lhashemi
Messages: 9
Registered: February 2014
Junior Member
Hi

I have an array and want to write the values to a geotiff. I have another GEOtiff file of the same area with exactly same dimension. I read this GEotiff and extracted its Geokey info (GeoKeys). I use this command to create a new Geotiif using this Geokey:

TIFF_write, test.tiff, data ,GEOTIFF=GeoKeys

I got this error message "Keyword FLOAT not allowed in call to: TIFF_WRITE", do you what is wrong with this?

Thanks
LHB
Re: Write a GeoTiff [message #88550 is a reply to message #88549] Mon, 12 May 2014 12:28 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lhashemi@g.harvard.edu writes:

> I have an array and want to write the values to a geotiff. I have another GEOtiff file of the same area with exactly same dimension. I read this GEotiff and extracted its Geokey info (GeoKeys). I use this command to create a new Geotiif using this Geokey:
>
> TIFF_write, test.tiff, data ,GEOTIFF=GeoKeys
>
> I got this error message "Keyword FLOAT not allowed in call to: TIFF_WRITE", do you what is wrong with this?

Haha! I'd try putting quotes around "test.tiff". That might help.
Strange error message, though. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Write a GeoTiff [message #88551 is a reply to message #88550] Mon, 12 May 2014 12:33 Go to previous messageGo to next message
lhashemi is currently offline  lhashemi
Messages: 9
Registered: February 2014
Junior Member
On Monday, May 12, 2014 3:28:06 PM UTC-4, David Fanning wrote:
> lhashemi@g.harvard.edu writes:
>
>
>
>> I have an array and want to write the values to a geotiff. I have another GEOtiff file of the same area with exactly same dimension. I read this GEotiff and extracted its Geokey info (GeoKeys). I use this command to create a new Geotiif using this Geokey:
>
>>
>
>> TIFF_write, test.tiff, data ,GEOTIFF=GeoKeys
>
>>
>
>> I got this error message "Keyword FLOAT not allowed in call to: TIFF_WRITE", do you what is wrong with this?
>
>
>
> Haha! I'd try putting quotes around "test.tiff". That might help.
>
> Strange error message, though. :-)
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Hi David,

Sorry, it has quotes around the file, when I delete ",/float, GEOTIFF=GeoKeys" it creats a tiff file which is not geo-referenced, and when I add "GEOTIFF=GeoKeys" (GeoKeys comes from another geotiff with same dimension), it gives this error: "Keyword GeoKeys not allowed in call to: TIFF_WRITE", any help highly appreciated.

Thanks
Re: Write a GeoTiff [message #88552 is a reply to message #88551] Mon, 12 May 2014 12:36 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lhashemi@g.harvard.edu writes:

> Sorry, it has quotes around the file, when I delete ",/float, GEOTIFF=GeoKeys" it creats a tiff file which is not geo-referenced, and when I add "GEOTIFF=GeoKeys" (GeoKeys comes from another geotiff with same dimension), it gives this error: "Keyword GeoKeys not allowed in call to: TIFF_WRITE", any help highly appreciated.

Can you show me the line of code *exactly* as you have written it.

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Write a GeoTiff [message #88554 is a reply to message #88552] Mon, 12 May 2014 12:41 Go to previous messageGo to next message
lhashemi is currently offline  lhashemi
Messages: 9
Registered: February 2014
Junior Member
On Monday, May 12, 2014 3:36:13 PM UTC-4, David Fanning wrote:
> lhashemi@g.harvard.edu writes:
>
>
>
>> Sorry, it has quotes around the file, when I delete ",/float, GEOTIFF=GeoKeys" it creats a tiff file which is not geo-referenced, and when I add "GEOTIFF=GeoKeys" (GeoKeys comes from another geotiff with same dimension), it gives this error: "Keyword GeoKeys not allowed in call to: TIFF_WRITE", any help highly appreciated.
>
>
>
> Can you show me the line of code *exactly* as you have written it.
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

these are the lines:

LandCover = READ_TIFF('C:\SWE\Data\ssmis\LandCoverSSMIS.tif', GEOTIFF=GeoKeys)
filename = 'C:\SWE\Data\ssmis\SSMIS_SWE2.tif'
TIFF_write, filename, SWE, GEOTIFF=GeoKeys

LandCover and SWE both have same dimension: [868,1042]

Thanks
LHB
Re: Write a GeoTiff [message #88555 is a reply to message #88554] Mon, 12 May 2014 12:44 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lhashemi@g.harvard.edu writes:

> these are the lines:
>
> LandCover = READ_TIFF('C:\SWE\Data\ssmis\LandCoverSSMIS.tif', GEOTIFF=GeoKeys)
> filename = 'C:\SWE\Data\ssmis\SSMIS_SWE2.tif'
> TIFF_write, filename, SWE, GEOTIFF=GeoKeys
>
> LandCover and SWE both have same dimension: [868,1042]

Well, since you aren't using a FLOAT keyword in this command, I would
say the problem is you haven't recompiled this piece of code from the
last time you DID use a FLOAT keyword in this command.

In other words, you aren't running the code you think you are running.
:-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Write a GeoTiff [message #88556 is a reply to message #88555] Mon, 12 May 2014 12:49 Go to previous messageGo to next message
lhashemi is currently offline  lhashemi
Messages: 9
Registered: February 2014
Junior Member
On Monday, May 12, 2014 3:44:09 PM UTC-4, David Fanning wrote:
> lhashemi@g.harvard.edu writes:
>
>
>
>> these are the lines:
>
>>
>
>> LandCover = READ_TIFF('C:\SWE\Data\ssmis\LandCoverSSMIS.tif', GEOTIFF=GeoKeys)
>
>> filename = 'C:\SWE\Data\ssmis\SSMIS_SWE2.tif'
>
>> TIFF_write, filename, SWE, GEOTIFF=GeoKeys
>
>>
>
>> LandCover and SWE both have same dimension: [868,1042]
>
>
>
> Well, since you aren't using a FLOAT keyword in this command, I would
>
> say the problem is you haven't recompiled this piece of code from the
>
> last time you DID use a FLOAT keyword in this command.
>
>
>
> In other words, you aren't running the code you think you are running.
>
> :-)
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

you are right, because my value are float,I used : TIFF_write, filename, SWE, /Float, GEOTIFF=GeoKeys . it gives same error " "Keyword FLOAT not allowed in call to: TIFF_WRITE" , I deleted "/float" the message become " Keyword GeoKeys not allowed in call to: TIFF_WRITE". when I delete both /float and GeoKeys keywords, it creates a tif file not GeoTiff. I want to creat Geotiff file.
Re: Write a GeoTiff [message #88557 is a reply to message #88556] Mon, 12 May 2014 12:59 Go to previous messageGo to next message
lhashemi is currently offline  lhashemi
Messages: 9
Registered: February 2014
Junior Member
On Monday, May 12, 2014 3:49:30 PM UTC-4, lhas...@g.harvard.edu wrote:
> On Monday, May 12, 2014 3:44:09 PM UTC-4, David Fanning wrote:
>
>> lhashemi@g.harvard.edu writes:
>
>>
>
>>
>
>>
>
>>> these are the lines:
>
>>
>
>>>
>
>>
>
>>> LandCover = READ_TIFF('C:\SWE\Data\ssmis\LandCoverSSMIS.tif', GEOTIFF=GeoKeys)
>
>>
>
>>> filename = 'C:\SWE\Data\ssmis\SSMIS_SWE2.tif'
>
>>
>
>>> TIFF_write, filename, SWE, GEOTIFF=GeoKeys
>
>>
>
>>>
>
>>
>
>>> LandCover and SWE both have same dimension: [868,1042]
>
>>
>
>>
>
>>
>
>> Well, since you aren't using a FLOAT keyword in this command, I would
>
>>
>
>> say the problem is you haven't recompiled this piece of code from the
>
>>
>
>> last time you DID use a FLOAT keyword in this command.
>
>>
>
>>
>
>>
>
>> In other words, you aren't running the code you think you are running.
>
>>
>
>> :-)
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>>
>
>>
>
>> David
>
>>
>
>> --
>
>>
>
>> David Fanning, Ph.D.
>
>>
>
>> Fanning Software Consulting, Inc.
>
>>
>
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
>>
>
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
>
>
> you are right, because my value are float,I used : TIFF_write, filename, SWE, /Float, GEOTIFF=GeoKeys . it gives same error " "Keyword FLOAT not allowed in call to: TIFF_WRITE" , I deleted "/float" the message become " Keyword GeoKeys not allowed in call to: TIFF_WRITE". when I delete both /float and GeoKeys keywords, it creates a tif file not GeoTiff. I want to creat Geotiff file.



the problem is solved :)
Re: Write a GeoTiff [message #88558 is a reply to message #88557] Mon, 12 May 2014 13:05 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lhashemi@g.harvard.edu writes:

> the problem is solved :)

Let me guess. You restarted IDL (as opposed to recompiling the program).
:-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Write a GeoTiff [message #88559 is a reply to message #88558] Mon, 12 May 2014 13:16 Go to previous messageGo to next message
lhashemi is currently offline  lhashemi
Messages: 9
Registered: February 2014
Junior Member
On Monday, May 12, 2014 4:05:23 PM UTC-4, David Fanning wrote:
> lhashemi@g.harvard.edu writes:
>
>
>
>> the problem is solved :)
>
>
>
> Let me guess. You restarted IDL (as opposed to recompiling the program).
>
> :-)
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

:))))) no, I used Write-tiff instead tiff-write :)))) Thanks for taking the time to help.

cheers
LHB
Re: Write a GeoTiff [message #88560 is a reply to message #88559] Mon, 12 May 2014 13:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lhashemi@g.harvard.edu writes:

> :))))) no, I used Write-tiff instead tiff-write :)))) Thanks for taking the time to help.

Ah! :-)

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how to shade region of 2-D plot
Next Topic: Nearest-neighbor interpolation and steepest-descent method

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

Current Time: Wed Oct 08 11:43:15 PDT 2025

Total time taken to generate the page: 0.00526 seconds