[gdal-dev] Guidance sought on using gdal-translate

Christopher Hunt huntc at internode.on.net
Tue Jul 29 09:26:58 EDT 2008


Hi there,

Being new to gdal I'm hoping that someone can help me by verifying my  
gdal_translate command. Thanks in advance.

I have an aerial photo of an airport which I therefore assume is  
orthographic. Three points have been provided to me which I am  
assuming to be wgs84:

point1 = -0.49310374, 51.47858961
point2 = -0.46551585, 51.47177116
point3 = -0.43439870, 51.46490423

The x and y pixel positions appear to be as follows:

61, 115
465, 280
899, 435

I then determine the easting/northing values using proj:

 > proj +proj=ortho +datum=WGS84
 > -0.49310374 51.47858961
-34186.74	4990098.00
 > -0.46551585 51.47177116
-32278.95	4989625.23
 > -0.43439870 51.46490423
-30125.85	4989149.04
 > ^C

Given the above is this the correct command to geocode my image?

 > gdal_translate -a_srs '+proj=ortho +datum=WGS84' \
-gcp 61 115 -34186.74 4990098.00 \
-gcp 465 280 -32278.95 4989625.23 \
-gcp 899 435 -30125.85 4989149.04 \
inputfile.jpg outputfile.tif

I ask because if I subsequently warp using:

gdalwarp -t_srs '+proj=eqc +datum=WGS84' -dstalpha -multi  
outputfile.tif outputfile-eqc.tif

...then things don't look quite right... (a 1024x650 image becomes a  
2923x456 image).

Thanks again for any help.

Cheers,
-C


More information about the gdal-dev mailing list