Index . 블로그창고 . Any comments?

cat: gis

How To
How do I preserve GeoTIFF info when editing my image?
Articles

How To

How do I preserve GeoTIFF info when editing my image?

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.

Articles


All the works in this site except software and copyrighted materials by others (e.g., 문학) are licensed under a Creative Commons License. 소프트웨어 및 문학과 같이 다른 이에게 저작권이 있는 작품을 제외하고 모두 크리에이티브 커먼즈 라이센스를 따른다.
Fri Apr 12 04:19:39 2024 . XHTML . CSS (lightbox.css is not part of Uniqki. ;-) . Powered by Uniqki!
refresh . edit . loginout . index