[Gdal-dev] Wrong offset or trade secret
Frank Warmerdam
warmerdam at pobox.com
Sat Oct 1 17:35:09 EDT 2005
On 10/1/05, John O Rountree <JohnRountree at msn.com> wrote:
> I wrote a geotiff parser just to know how! The test file uses little-endian
> "MM". The offsets points to correct information for tags with Field Types
> other than the two double (8 byte) values; tags 33550 & 33922.
> ModelPixelScaleX is suppose to = 60 and Y = 60. Raw directory Data = 33550,
> 12, 3, 262830; The 262830 offset points to (8bytes) 0,0,0,0,0,0,78,64 and Y
> = the same 78,64 value. There is no way using little or big-endian that this
> will ever = 60! Using little-endian actual value would be 4.6********+e18. A
> Huge # and the same results with ModelTiePointTagI-K = huge #'s!
>
> The file is OK as other readers extract the correct values. IS THERE SOME
> MATH REQUIRED to convert 4.6*****+e18 # to 60?
John,
The values are IEEE double precision float values, but beyond that byte swapping
should be the only issue to deal with. If you want more help you might need to
post the file. Writing a new GeoTIFF parser (for kicks?) would likely be a
more appropriate topic on the geotiff mailing list. See:
http://geotiff.maptools.org/
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list