[Gdal-dev] Corrupted WKT in my GeoTIFF dem

Michael Logan mlogan at mail.arc.nasa.gov
Fri Jul 30 18:45:36 EDT 2004




Frank Warmerdam wrote:

> Michael Logan wrote:
>
>> Hello,
>>
>> I am trying to create a Geotiff DEM from scratch during conversion
>> from GridFloat format (i've tried multple formats (int16,float32,byte)),
>> but while everything seems good, the WKT is always clobbered.
>>
>> I set the WKT in my C++ code, but after closing the file and exiting,
>> a gdalinfo gives "badness" for the projection portion:
>>
>> ------
>> % gdalinfo area79.tiff
>> Driver: GTiff/GeoTIFF
>> Size is 21600, 7200
>> Coordinate System is `'
>> Corner Coordinates:
>> Upper Left  (    0.0,    0.0)
>> Lower Left  (    0.0, 7200.0)
>> Upper Right (21600.0,    0.0)
>> Lower Right (21600.0, 7200.0)
>> Center      (10800.0, 3600.0)
>> Band 1 Block=21600x1 Type=Int16, ColorInterp=Gray
>> -----
>>
>> So, my corners don't appear as Geographics corners
>> as I'd hoped, since it appears no info is available
>> to do the transform..
>
>
> Michael,
>
> Do you set a geotransform?  Are you sure you are closing the file 
> properly?
> What version of GDAL are you using?  Can you provide a small but complete
> example program that demonstrates your problem?
>
> I see two likely issues:
>  o If you don't close the file properly, the header info likely won't 
> be written
>    properly.


I am doing a GDALClose() just before exiting.

>  o If you just write a coordinate system but no geotransform, I don't 
> think any
>    of the geotiff info gets written out.

Ok, this is might be it..   I didn't give the dataset ANY geotransforms.  
I'm still not clear on how to use it and how it relates to the 
Projection WKT.
I want a Geographic/unprojected GeoTIFF dem, so it seems
I need to read some more..  8-)

thanks,
ml

>
> Best regards,



-- 
Michael Logan  (650)-604-4494  QSS Group,Inc./NASA Ames Research Center
Task Lead, Visual Cueing & Simulation
Task Lead, Dynamic Aircraft Reconfiguration & Damage Adaptive Control
MS 262-6,Moffett Field, CA, 94035
private: logan5 at comcast.net





More information about the Gdal-dev mailing list