[Gdal-dev] Corrupted WKT in my GeoTIFF dem

Michael Logan mlogan at mail.arc.nasa.gov
Fri Jul 30 19:10:13 EDT 2004


oh, way cool.   works great now with the geotransform.
Thanks Frank.
ml


Driver: GTiff/GeoTIFF
Size is 21600, 7200
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235629972,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-120.000000,41.999722)
Pixel Size = (0.00027778,-0.00027778)
Corner Coordinates:
Upper Left  (-120.0000000,  41.9997222)
Lower Left  (-120.0000000,  39.9997222)
Upper Right (-114.0000000,  41.9997222)
Lower Right (-114.0000000,  39.9997222)
Center      (-117.0000000,  40.9997222)
Band 1 Block=21600x1 Type=Int16, ColorInterp=Gray


Michael Logan wrote:

>
>
>
> 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