Even,<br><br>Thank you for explaining about tags in GeoTiff, I did not realize that have priority over the world file. Your solution of using PROFILE=BASELINE works, however it also truncates some useful tags, such as the coordinate system. I could put the coordinate system back with -a_srs, but is there a way to selectively delete certain tags froma GeoTiff (I suppose while re-creating it, not in-place)? <br>
<br>Or, is there a way to at least see the tags? Looked briefly at "tiffinfo" and noticed output "Tag 33922: 0.000000,0.000000,0.000000,5051999.800000,5052000.000000,0.000000" which looks to me like it's citing the origin coordinates. However, did not investigate further so far...<br>
<br>Best regards,<br>Aleksey<br><br><div class="gmail_quote">On Thu, Oct 22, 2009 at 2:02 PM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Selon Aleksey Naumov <<a href="mailto:anaumov@gmail.com">anaumov@gmail.com</a>>:<br>
<br>
GDAL GeoTIFF driver always use the GeoTIFF tag when it is found. Worldfiles are<br>
only used when no GeoTIFF tag exists.<br>
<br>
One way of achieving what you want to do is to produce a clone of your original<br>
GeoTIFF without the geotiff tag by using the PROFILE=BASELINE creation option.<br>
<br>
For example :<br>
gdal_translate 1km177310505102008GROUPEALTA.tif<br>
1km177310505102008GROUPEALTA_nogeotifftag.tif -co PROFILE=BASELINE<br>
<br>
and then rename your worldfile to 1km177310505102008GROUPEALTA_nogeotifftag.wld<br>
<div><div></div><div class="h5"><br>
> HI all,<br>
><br>
> I am trying to understand how coordinate information is stored in a GeoTiff<br>
> file, specifically the origin (UL corner) of the image. I have a few images<br>
> which clearly have wrong origins, so they do not display correctly. Both<br>
> ArcGIS and GDAL report incorrect origins.<br>
><br>
> Initially I thought that the world files for the images were at fault,<br>
> however, they look totally fine. Here is an example -- notice really large<br>
> X-coord of origin as reported by gdalinfo:<br>
> > gdalinfo 1km177310505102008GROUPEALTA.tif<br>
> Driver: GTiff/GeoTIFF<br>
> Files: 1km177310505102008GROUPEALTA.tif<br>
> 1km177310505102008GROUPEALTA.tfw<br>
> Size is 5000, 5000<br>
> Coordinate System is:<br>
> PROJCS["UTM Zone 17N",<br>
> GEOGCS["NAD83_CSRS_1",<br>
> DATUM["NAD83_CSRS_1",<br>
> SPHEROID["GRS 1980",6378137,298.2572220960423]],<br>
> PRIMEM["Greenwich",0],<br>
> UNIT["degree",0.0174532925199433]],<br>
> PROJECTION["Transverse_Mercator"],<br>
> PARAMETER["latitude_of_origin",0],<br>
> PARAMETER["central_meridian",-81],<br>
> PARAMETER["scale_factor",0.9996],<br>
> PARAMETER["false_easting",500000],<br>
> PARAMETER["false_northing",0],<br>
> UNIT["metre",1,<br>
> AUTHORITY["EPSG","9001"]]]<br>
> Origin = (5051999.800000000700000,5052000.000000000000000)<br>
> Pixel Size = (0.200000000000000,-0.200000000000000)<br>
> Metadata:<br>
> TIFFTAG_SOFTWARE=Adobe Photoshop CS2 Windows<br>
> TIFFTAG_DATETIME=2008:12:30 16:08:24<br>
> TIFFTAG_XRESOLUTION=72<br>
> TIFFTAG_YRESOLUTION=72<br>
> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)<br>
> AREA_OR_POINT=Area<br>
> Image Structure Metadata:<br>
> INTERLEAVE=PIXEL<br>
> Corner Coordinates:<br>
> Upper Left ( 5051999.800, 5052000.000) ( 34d52'42.64"W, 34d45'16.48"N)<br>
> Lower Left ( 5051999.800, 5051000.000) ( 34d52'48.38"W, 34d44'52.51"N)<br>
> Upper Right ( 5052999.800, 5052000.000) ( 34d52'28.05"W, 34d45'5.78"N)<br>
> Lower Right ( 5052999.800, 5051000.000) ( 34d52'33.77"W, 34d44'41.81"N)<br>
> Center ( 5052499.800, 5051500.000) ( 34d52'38.21"W, 34d44'59.14"N)<br>
> Band 1 Block=5000x1 Type=Byte, ColorInterp=Red<br>
> Band 2 Block=5000x1 Type=Byte, ColorInterp=Green<br>
> Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue<br>
><br>
> The world file looks fine to me, and it has correct origin info (X-coord):<br>
> > type 1km177310505102008GROUPEALTA.tfw<br>
> 0.200000<br>
> 0.000000<br>
> 0.000000<br>
> -0.200000<br>
> 731000.100000<br>
> 5051999.900000<br>
><br>
> Even if I rename the TFW file, gdalinfo still reports the same incorrect<br>
> origin, so it must be stored in a GeoTiff tag, I guess? If so, how do I<br>
> override and correct this info on an image? Also, does a world file not have<br>
> a higher priority than a built-in tag value?<br>
><br>
> Thank you,<br>
> Aleksey<br>
><br>
<br>
<br>
</div></div></blockquote></div><br>