cat: gis
When I edit my GeoTIFF image in Photoshop or other applications, and then save the result the geotiff information is lost. How can I avoid this?
If a given applications does not support the GeoTIFF tags it will generally discard them when reading a GeoTIFF image and they won't be present after a save. However, it is possible to save the GeoTIFF metadata and reapply it to the image later using commandline utilities distributed with libgeotiff.
Given a GeoTIFF file named original.tif, and a modified file (modified.tif) without the GeoTIFF tags, but still the same size and region:
listgeo -no_norm original.tif > original.geo geotifcp -g original.geo modified.tif modified_geotiff.tif
The listgeo utility is saving a text version of the geotiff tags in the file original.geo, and then geotifcp is copying the modified image, and in the process reapplying the GeoTIFF tags to produce a modified GeoTIFF file. This process only works properly if the modified.tif is the same number of pixels and lines as the original file, and represents the same region on the earth.