Write a GeoTiff [message #88549] |
Mon, 12 May 2014 12:24  |
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 #88551 is a reply to message #88550] |
Mon, 12 May 2014 12:33   |
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   |
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   |
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   |
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   |
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   |
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 :)
|
|
|
|
|
|