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, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to