Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4479 closed defect (duplicate)

listgeo: too many digits in ModelTiepointTag causes errors with geotifcp

Reported by: peterahlstrom Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.9.0
Severity: normal Keywords:
Cc:

Description

Hi there. I'm very much a hobbyist, so bear with me. I started looking into geotiff only last week, but I've found an error with listgeo.

I was using the "export .geo from listgeo, edit tiff in Photoshop, reimport geotiff tags via geotifcp" method described in the documentation, when the resulting file's listgeo results didn't look the same as the source file's. I tracked it down to this bug.

Here is the top of the export from listgeo from the original file:

Geotiff_Information:

Version: 1 Key_Revision: 1.0 Tagged_Information:

ModelTiepointTag (2,3):

0 0 0 -9936037.645533939957179.55064676 0

ModelPixelScaleTag (1,3):

5370.19363925182 5370.19363925182 0

End_Of_Tags.

In ModelTiepointTag, the first number runs into the second number. This is what causes the error when reimporting. So I changed it to this (changing the last digit of the decimal to a space):

ModelTiepointTag (2,3):

0 0 0 -9936037.6455339 9957179.55064676 0

After that my retagged geotiff worked fine.

I'm not sure what the version number of my listgeo binary, but I installed it from homebrew the same day I installed GDAL 1.9.0, released 2011/12/29.

Change History (4)

comment:1 by warmerdam, 12 years ago

Resolution: duplicate
Status: newclosed

I believe this is a duplicate of: http://trac.osgeo.org/geotiff/ticket/37

Note that it is not a GDAL problem as I understand it.

comment:2 by peterahlstrom, 12 years ago

You're right on both accounts. I did put it in the wrong ticketing place.

Those other tickets were both In ModelPixelScaleTag, which I didn't have a problem with. My error was in ModelTiepointTag, though it's the exact sme error. Do you know if 11 months ago that was fixed too?

Peter

comment:3 by warmerdam, 12 years ago

I have reviewed the code change and it should apply to all the array-of-values printing from listgeo including ModelTiepointTag. If it is convenient for you to test the modified geo_print.c that would be nice.

http://svn.osgeo.org/metacrs/geotiff/trunk/libgeotiff/geo_print.c

comment:4 by peterahlstrom, 12 years ago

I apologize for the hassle. Turns out homebrew's libgeotiff uses 1.3.0. I installed 1.4.0RC1 and the error is fixed there. I'm going to assume it stays the same in current svn. So this is definitely closed. Thanks!

Note: See TracTickets for help on using tickets.