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

Frank Warmerdam warmerdam at pobox.com
Tue Jul 29 13:15:10 EDT 2008


Christopher Hunt wrote:
> 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).

Chris,

Given your assumptions I believe you have done things properly.  I would
suggest you question your assumptions - particularly that the image is
in an orthographic projection and that if it is in an orthographic
projection that default lat_0 and lon_0 values are appropriate.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list