<div dir="ltr"><div><div>Hello all,<br><br>I am trying to create a geotiff from a .png (screenshot for testing), but gdal_translate gets the corner coordinates wrong.<br><br>My steps:<br>Works with Chrome Browser only:<br>
<a href="http://overlay-tiler.googlecode.com/svn/trunk/upload.html">http://overlay-tiler.googlecode.com/svn/trunk/upload.html</a><br>with screenshot:<br><a href="http://www.diy-streetview.com/data/geotiff/Neurott.png">http://www.diy-streetview.com/data/geotiff/Neurott.png</a><br>
and <br>Ampèrestraße 63225, Langen, Hessen, Germany<br><br>gives:<br><br>gdal_translate \<br> -gcp 0 0 8.648622773788475 50.00162255942198 \<br> -gcp 644 0 8.655532144210838 50.00162255942198 \<br> -gcp 644 899 8.655532144210838 49.99542253867455 \<br>
Neurott.png out.png <br><br>gdal2tiles.py -s EPSG:4326 -z 16-19 out.png out<br><br>Entering the local file names:<br>gdal_translate \<br> -gcp 0 0 8.648585222862266 50.001663936185025 \<br> -gcp 644 0 8.65549459328463 50.001663936185025 \<br>
-gcp 644 899 8.65549459328463 49.995463920773624 \<br> /home/me/geotiff/Neurott.png /home/me/geotiff/Neurott.tiff <br><br>seems to work, but<br><br>gdalinfo /home/me/geotiff/Neurott.tiff <br><br>shows that the Corner Coordinates are the pixel values, and not the lat/lon coordinates:<br>
<br>Size is 644, 899<br>Coordinate System is `'<br>GCP Projection = <br>GCP[ 0]: Id=1, Info=<br> (0,0) -> (8.64858522286227,50.001663936185,0)<br>GCP[ 1]: Id=2, Info=<br> (644,0) -> (8.65549459328463,50.001663936185,0)<br>
GCP[ 2]: Id=3, Info=<br> (644,899) -> (8.65549459328463,49.9954639207736,0)<br>Image Structure Metadata:<br> INTERLEAVE=PIXEL<br>Corner Coordinates:<br>Upper Left ( 0.0, 0.0)<br>Lower Left ( 0.0, 899.0)<br>
Upper Right ( 644.0, 0.0)<br>Lower Right ( 644.0, 899.0)<br>Center ( 322.0, 449.5)<br>Band 1 Block=644x4 Type=Byte, ColorInterp=Red<br>Band 2 Block=644x4 Type=Byte, ColorInterp=Green<br>Band 3 Block=644x4 Type=Byte, ColorInterp=Blue<br>
<br>How to fix this?<br><br>I tried with <br>GDAL 1.11dev, released 2013/04/13<br>installed on ubuntu via sudo apt-get install gdal-bin<br>and <br>GDAL 1.10.1, released 2013/08/26<br>compiled locally on Ubuntu 64 bit, 12.04.3 precise.<br>
Both get this wrong.<br><br>Any ideas?<br><br></div>Thanks,<br></div>Jan<br></div>