[Gdal-dev] gdalwarp doesn't honour my GCPs
Maciek Sieczka
werchowyna at epf.pl
Thu Sep 1 16:15:53 EDT 2005
Dear All,
I have a tif+tfw file. It's georeferencing is *very* loose, so I added 118
GCPs *[1] and tried to gdalwarp it, using these GCPs, to correct the
georeferencing. However, gdalwarp outputs a clone of input file instead of
warping *[2]. You can see that corner coordinates of input and output are
identical, in spite of GCPs present in the input... What's wrong (with me?)?
If my input file with GCPs is needed for investigation, grab it here:
http://www.biol.uni.wroc.pl/sieczka/udostepnione/prochowice_z5_gdtr.tif.tar.bz2
(9,9 MB).
Thanks for any hints!
Cheers,
Maciek
[1]
[trawiarz at quercus ~]$ gdal_translate `cat GCPs.txt` prochowice_z5_gimp.tif
prochowice_z5_gdtr.tif
Input file size is 3334, 5568
0...10...20...30...40...50...60...70...80...90...100 - done.
ERROR 6: SetColorTable() not supported for this dataset.
# ^
# |
# that's another thing, I've filled a bug report on that today
[trawiarz at quercus ~]$ gdalinfo prochowice_z5_gdtr.tif
Driver: GTiff/GeoTIFF
Size is 3334, 5568
Coordinate System is `'
Origin = (5592805.032917,5686085.775819)
Pixel Size = (2.11666667,-2.11666667)
GCP Projection =
GCP[ 0]: Id=1, Info=
(5.594e+06,5.675e+06) -> (5.594e+06,5.675e+06,0)
GCP[ 1]: Id=2, Info=
(5.595e+06,5.67498e+06) -> (5.595e+06,5.675e+06,0)
GCP[ 2]: Id=3, Info=
(5.596e+06,5.67497e+06) -> (5.596e+06,5.675e+06,0)
GCP[ 3]: Id=4, Info=
(5.597e+06,5.67495e+06) -> (5.597e+06,5.675e+06,0)
GCP[ 4]: Id=5, Info=
(5.598e+06,5.67494e+06) -> (5.598e+06,5.675e+06,0)
GCP[ 5]: Id=6, Info=
(5.59901e+06,5.67492e+06) -> (5.599e+06,5.675e+06,0)
GCP[ 6]: Id=7, Info=
(5.59402e+06,5.676e+06) -> (5.594e+06,5.676e+06,0)
GCP[ 7]: Id=8, Info=
(5.59502e+06,5.67598e+06) -> (5.595e+06,5.676e+06,0)
GCP[ 8]: Id=9, Info=
(5.59602e+06,5.67597e+06) -> (5.596e+06,5.676e+06,0)
GCP[ 9]: Id=10, Info=
(5.59702e+06,5.67595e+06) -> (5.597e+06,5.676e+06,0)
GCP[ 10]: Id=11, Info=
(5.59802e+06,5.67593e+06) -> (5.598e+06,5.676e+06,0)
GCP[ 11]: Id=12, Info=
(5.59902e+06,5.67592e+06) -> (5.599e+06,5.676e+06,0)
GCP[ 12]: Id=13, Info=
(5.59403e+06,5.677e+06) -> (5.594e+06,5.677e+06,0)
GCP[ 13]: Id=14, Info=
(5.59503e+06,5.67698e+06) -> (5.595e+06,5.677e+06,0)
GCP[ 14]: Id=15, Info=
(5.59604e+06,5.67696e+06) -> (5.596e+06,5.677e+06,0)
GCP[ 15]: Id=16, Info=
(5.59704e+06,5.67695e+06) -> (5.597e+06,5.677e+06,0)
GCP[ 16]: Id=17, Info=
(5.59804e+06,5.67693e+06) -> (5.598e+06,5.677e+06,0)
GCP[ 17]: Id=18, Info=
(5.59904e+06,5.67692e+06) -> (5.599e+06,5.677e+06,0)
GCP[ 18]: Id=19, Info=
(5.59405e+06,5.67799e+06) -> (5.594e+06,5.678e+06,0)
GCP[ 19]: Id=20, Info=
(5.59505e+06,5.67798e+06) -> (5.595e+06,5.678e+06,0)
GCP[ 20]: Id=21, Info=
(5.59605e+06,5.67796e+06) -> (5.596e+06,5.678e+06,0)
GCP[ 21]: Id=22, Info=
(5.59706e+06,5.67795e+06) -> (5.597e+06,5.678e+06,0)
GCP[ 22]: Id=23, Info=
(5.59805e+06,5.67793e+06) -> (5.598e+06,5.678e+06,0)
GCP[ 23]: Id=24, Info=
(5.59906e+06,5.67791e+06) -> (5.599e+06,5.678e+06,0)
GCP[ 24]: Id=25, Info=
(5.59406e+06,5.67899e+06) -> (5.594e+06,5.679e+06,0)
GCP[ 25]: Id=26, Info=
(5.59507e+06,5.67897e+06) -> (5.595e+06,5.679e+06,0)
GCP[ 26]: Id=27, Info=
(5.59607e+06,5.67896e+06) -> (5.596e+06,5.679e+06,0)
GCP[ 27]: Id=28, Info=
(5.59707e+06,5.67894e+06) -> (5.597e+06,5.679e+06,0)
GCP[ 28]: Id=29, Info=
(5.59807e+06,5.67892e+06) -> (5.598e+06,5.679e+06,0)
GCP[ 29]: Id=30, Info=
(5.59908e+06,5.67891e+06) -> (5.599e+06,5.679e+06,0)
GCP[ 30]: Id=31, Info=
(5.59408e+06,5.67998e+06) -> (5.594e+06,5.68e+06,0)
GCP[ 31]: Id=32, Info=
(5.59508e+06,5.67996e+06) -> (5.595e+06,5.68e+06,0)
GCP[ 32]: Id=33, Info=
(5.59608e+06,5.67994e+06) -> (5.596e+06,5.68e+06,0)
GCP[ 33]: Id=34, Info=
(5.59709e+06,5.67993e+06) -> (5.597e+06,5.68e+06,0)
GCP[ 34]: Id=35, Info=
(5.59809e+06,5.67991e+06) -> (5.598e+06,5.68e+06,0)
GCP[ 35]: Id=36, Info=
(5.59909e+06,5.6799e+06) -> (5.599e+06,5.68e+06,0)
GCP[ 36]: Id=37, Info=
(5.59409e+06,5.68098e+06) -> (5.594e+06,5.681e+06,0)
GCP[ 37]: Id=38, Info=
(5.5951e+06,5.68096e+06) -> (5.595e+06,5.681e+06,0)
GCP[ 38]: Id=39, Info=
(5.5961e+06,5.68094e+06) -> (5.596e+06,5.681e+06,0)
GCP[ 39]: Id=40, Info=
(5.5971e+06,5.68092e+06) -> (5.597e+06,5.681e+06,0)
GCP[ 40]: Id=41, Info=
(5.5981e+06,5.68091e+06) -> (5.598e+06,5.681e+06,0)
GCP[ 41]: Id=42, Info=
(5.59911e+06,5.68089e+06) -> (5.599e+06,5.681e+06,0)
GCP[ 42]: Id=43, Info=
(5.59411e+06,5.68197e+06) -> (5.594e+06,5.682e+06,0)
GCP[ 43]: Id=44, Info=
(5.59511e+06,5.68196e+06) -> (5.595e+06,5.682e+06,0)
GCP[ 44]: Id=45, Info=
(5.59611e+06,5.68194e+06) -> (5.596e+06,5.682e+06,0)
GCP[ 45]: Id=46, Info=
(5.59712e+06,5.68192e+06) -> (5.597e+06,5.682e+06,0)
GCP[ 46]: Id=47, Info=
(5.59812e+06,5.6819e+06) -> (5.598e+06,5.682e+06,0)
GCP[ 47]: Id=48, Info=
(5.59912e+06,5.68189e+06) -> (5.599e+06,5.682e+06,0)
GCP[ 48]: Id=49, Info=
(5.59412e+06,5.68297e+06) -> (5.594e+06,5.683e+06,0)
GCP[ 49]: Id=50, Info=
(5.59513e+06,5.68296e+06) -> (5.595e+06,5.683e+06,0)
GCP[ 50]: Id=51, Info=
(5.59613e+06,5.68294e+06) -> (5.596e+06,5.683e+06,0)
GCP[ 51]: Id=52, Info=
(5.59713e+06,5.68292e+06) -> (5.597e+06,5.683e+06,0)
GCP[ 52]: Id=53, Info=
(5.59813e+06,5.6829e+06) -> (5.598e+06,5.683e+06,0)
GCP[ 53]: Id=54, Info=
(5.59914e+06,5.68289e+06) -> (5.599e+06,5.683e+06,0)
GCP[ 54]: Id=55, Info=
(5.59414e+06,5.68397e+06) -> (5.594e+06,5.684e+06,0)
GCP[ 55]: Id=56, Info=
(5.59514e+06,5.68395e+06) -> (5.595e+06,5.684e+06,0)
GCP[ 56]: Id=57, Info=
(5.59614e+06,5.68394e+06) -> (5.596e+06,5.684e+06,0)
GCP[ 57]: Id=58, Info=
(5.59715e+06,5.68392e+06) -> (5.597e+06,5.684e+06,0)
GCP[ 58]: Id=59, Info=
(5.59815e+06,5.6839e+06) -> (5.598e+06,5.684e+06,0)
GCP[ 59]: Id=60, Info=
(5.59915e+06,5.68389e+06) -> (5.599e+06,5.684e+06,0)
GCP[ 60]: Id=61, Info=
(5.59415e+06,5.68497e+06) -> (5.594e+06,5.685e+06,0)
GCP[ 61]: Id=62, Info=
(5.59516e+06,5.68495e+06) -> (5.595e+06,5.685e+06,0)
GCP[ 62]: Id=63, Info=
(5.59616e+06,5.68493e+06) -> (5.596e+06,5.685e+06,0)
GCP[ 63]: Id=64, Info=
(5.59716e+06,5.68492e+06) -> (5.597e+06,5.685e+06,0)
GCP[ 64]: Id=65, Info=
(5.59816e+06,5.6849e+06) -> (5.598e+06,5.685e+06,0)
GCP[ 65]: Id=66, Info=
(5.59917e+06,5.68489e+06) -> (5.599e+06,5.685e+06,0)
GCP[ 66]: Id=67, Info=
(5.59318e+06,5.67462e+06) -> (5.59318e+06,5.6746e+06,0)
GCP[ 67]: Id=68, Info=
(5.59314e+06,5.6857e+06) -> (5.59298e+06,5.68572e+06,0)
GCP[ 68]: Id=69, Info=
(5.59399e+06,5.67462e+06) -> (5.594e+06,5.67461e+06,0)
GCP[ 69]: Id=70, Info=
(5.595e+06,5.67462e+06) -> (5.595e+06,5.67463e+06,0)
GCP[ 70]: Id=71, Info=
(5.596e+06,5.67463e+06) -> (5.596e+06,5.67465e+06,0)
GCP[ 71]: Id=72, Info=
(5.597e+06,5.67463e+06) -> (5.597e+06,5.67467e+06,0)
GCP[ 72]: Id=73, Info=
(5.598e+06,5.67463e+06) -> (5.598e+06,5.67469e+06,0)
GCP[ 73]: Id=74, Info=
(5.599e+06,5.67464e+06) -> (5.599e+06,5.67471e+06,0)
GCP[ 74]: Id=75, Info=
(5.59966e+06,5.67464e+06) -> (5.59966e+06,5.67472e+06,0)
GCP[ 75]: Id=76, Info=
(5.59965e+06,5.6747e+06) -> (5.59965e+06,5.67479e+06,0)
GCP[ 76]: Id=77, Info=
(5.59318e+06,5.67501e+06) -> (5.59317e+06,5.675e+06,0)
GCP[ 77]: Id=78, Info=
(5.59965e+06,5.67491e+06) -> (5.59964e+06,5.675e+06,0)
GCP[ 78]: Id=79, Info=
(5.59963e+06,5.6757e+06) -> (5.59961e+06,5.67579e+06,0)
GCP[ 79]: Id=80, Info=
(5.59317e+06,5.67601e+06) -> (5.59316e+06,5.676e+06,0)
GCP[ 80]: Id=81, Info=
(5.59963e+06,5.67591e+06) -> (5.5996e+06,5.676e+06,0)
GCP[ 81]: Id=82, Info=
(5.59961e+06,5.6767e+06) -> (5.59957e+06,5.67679e+06,0)
GCP[ 82]: Id=83, Info=
(5.59317e+06,5.67701e+06) -> (5.59314e+06,5.677e+06,0)
GCP[ 83]: Id=84, Info=
(5.5996e+06,5.67691e+06) -> (5.59956e+06,5.677e+06,0)
GCP[ 84]: Id=85, Info=
(5.59959e+06,5.67769e+06) -> (5.59953e+06,5.67779e+06,0)
GCP[ 85]: Id=86, Info=
(5.59317e+06,5.67801e+06) -> (5.59312e+06,5.678e+06,0)
GCP[ 86]: Id=87, Info=
(5.59958e+06,5.6779e+06) -> (5.59952e+06,5.678e+06,0)
GCP[ 87]: Id=88, Info=
(5.59956e+06,5.67869e+06) -> (5.59949e+06,5.67879e+06,0)
GCP[ 88]: Id=89, Info=
(5.59317e+06,5.679e+06) -> (5.5931e+06,5.679e+06,0)
GCP[ 89]: Id=90, Info=
(5.59956e+06,5.6789e+06) -> (5.59948e+06,5.679e+06,0)
GCP[ 90]: Id=91, Info=
(5.59954e+06,5.67968e+06) -> (5.59945e+06,5.67978e+06,0)
GCP[ 91]: Id=92, Info=
(5.59316e+06,5.68e+06) -> (5.59308e+06,5.68e+06,0)
GCP[ 92]: Id=93, Info=
(5.59953e+06,5.67989e+06) -> (5.59944e+06,5.68e+06,0)
GCP[ 93]: Id=94, Info=
(5.59951e+06,5.68067e+06) -> (5.59941e+06,5.68078e+06,0)
GCP[ 94]: Id=95, Info=
(5.59316e+06,5.68099e+06) -> (5.59306e+06,5.681e+06,0)
GCP[ 95]: Id=96, Info=
(5.59951e+06,5.68089e+06) -> (5.5994e+06,5.681e+06,0)
GCP[ 96]: Id=97, Info=
(5.59949e+06,5.68167e+06) -> (5.59937e+06,5.68178e+06,0)
GCP[ 97]: Id=98, Info=
(5.59316e+06,5.68199e+06) -> (5.59305e+06,5.682e+06,0)
GCP[ 98]: Id=99, Info=
(5.59948e+06,5.68189e+06) -> (5.59936e+06,5.682e+06,0)
GCP[ 99]: Id=100, Info=
(5.59946e+06,5.68267e+06) -> (5.59933e+06,5.68278e+06,0)
GCP[100]: Id=101, Info=
(5.59315e+06,5.68299e+06) -> (5.59303e+06,5.683e+06,0)
GCP[101]: Id=102, Info=
(5.59945e+06,5.68288e+06) -> (5.59932e+06,5.683e+06,0)
GCP[102]: Id=103, Info=
(5.59944e+06,5.68367e+06) -> (5.59929e+06,5.68378e+06,0)
GCP[103]: Id=104, Info=
(5.59315e+06,5.68399e+06) -> (5.59301e+06,5.684e+06,0)
GCP[104]: Id=105, Info=
(5.59943e+06,5.68388e+06) -> (5.59928e+06,5.684e+06,0)
GCP[105]: Id=106, Info=
(5.59941e+06,5.68467e+06) -> (5.59924e+06,5.68478e+06,0)
GCP[106]: Id=107, Info=
(5.59315e+06,5.68498e+06) -> (5.59299e+06,5.685e+06,0)
GCP[107]: Id=108, Info=
(5.59315e+06,5.68498e+06) -> (5.593e+06,5.685e+06,0)
GCP[108]: Id=109, Info=
(5.5994e+06,5.68488e+06) -> (5.59924e+06,5.685e+06,0)
GCP[109]: Id=110, Info=
(5.59316e+06,5.6857e+06) -> (5.593e+06,5.68572e+06,0)
GCP[110]: Id=111, Info=
(5.59417e+06,5.68571e+06) -> (5.594e+06,5.68574e+06,0)
GCP[111]: Id=112, Info=
(5.59517e+06,5.68571e+06) -> (5.595e+06,5.68576e+06,0)
GCP[112]: Id=113, Info=
(5.59617e+06,5.68571e+06) -> (5.596e+06,5.68578e+06,0)
GCP[113]: Id=114, Info=
(5.59938e+06,5.68572e+06) -> (5.5992e+06,5.68584e+06,0)
GCP[114]: Id=115, Info=
(5.59938e+06,5.68566e+06) -> (5.5992e+06,5.68578e+06,0)
GCP[115]: Id=116, Info=
(5.59717e+06,5.68571e+06) -> (5.597e+06,5.6858e+06,0)
GCP[116]: Id=117, Info=
(5.59817e+06,5.68571e+06) -> (5.598e+06,5.68582e+06,0)
GCP[117]: Id=118, Info=
(5.59918e+06,5.68572e+06) -> (5.599e+06,5.68583e+06,0)
Metadata:
TIFFTAG_DOCUMENTNAME=/home/trawiarz/prochowice_z5.tif
TIFFTAG_XRESOLUTION=300
TIFFTAG_YRESOLUTION=300
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Corner Coordinates:
Upper Left ( 5592805.033, 5686085.776)
Lower Left ( 5592805.033, 5674300.176)
Upper Right ( 5599862.000, 5686085.776)
Lower Right ( 5599862.000, 5674300.176)
Center ( 5596333.516, 5680192.976)
Band 1 Block=3334x2 Type=Byte, ColorInterp=Palette
Color Table (RGB with 256 entries)
<snip>
[2]
[trawiarz at quercus ~]$ gdalwarp prochowice_z5_gdtr.tif
prochowice_z5_gdtr_gdwr.tif
Creating output file that is 3334P x 5568L.
:0...10...20...30...40...50...60...70...80...90...100 - done.
[trawiarz at quercus ~]$ gdalinfo prochowice_z5_gdtr_gdwr.tif
Driver: GTiff/GeoTIFF
Size is 3334, 5568
Coordinate System is `'
Origin = (5592805.032917,5686085.775819)
Pixel Size = (2.11666667,-2.11666667)
Corner Coordinates:
Upper Left ( 5592805.033, 5686085.776)
Lower Left ( 5592805.033, 5674300.176)
Upper Right ( 5599862.000, 5686085.776)
Lower Right ( 5599862.000, 5674300.176)
Center ( 5596333.516, 5680192.976)
Band 1 Block=3334x2 Type=Byte, ColorInterp=Palette
Color Table (RGB with 256 entries)
<snip>
More information about the Gdal-dev
mailing list