Opened 15 years ago

Closed 15 years ago

#13 closed defect (fixed)

listgeo precision inadequate

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone:
Component: libgeotiff Version:
Keywords: Cc:

Description

I had a comment on item 23 in the FAQ, "How do I preserve GeoTIFF info when editing my image?". You recommend using listgeo and geotifcp to do this. I've also found this works well for many GeoTIFFs, but for those that use a GCS (such as EPSG 4326) you will find that listgeo does not provide enough precision in either the ModelTiePointTag nor the ModelPixelScaleTag. For example, here is the abbreviated output from listgeo for one of my GeoTIFFs:

      ModelTiepointTag (2,3):
         0                0                0
         -117.261352      32.7481285       0
      ModelPixelScaleTag (1,3):
         8.83040507e-006  8.83040507e-006  0

In actuality the tiepoint should be "-117.261351648534130 32.748128518429958" and more importantly the scale should be "0.000008830405072 -0.000008830405072". Though these may seem to be small differences they result in significant errors for large images.

I use listgeo to create a .geo file then I use gdalinfo to give me the higher precision tiepoint and scale values, then manually edit the .geo file with the higher precision values before using geotifcp to re-apply the geotiff tags.

Gary Gilbreath

---

FrankW: I think we need to fix listgeo, and perhaps also make a note in the FAQ.

Change History (1)

comment:1 by warmerdam, 15 years ago

Resolution: fixed
Status: newclosed

I have adjusted the format to be %-17.15g which hopefully will do better.

Note: See TracTickets for help on using tickets.