[Gdal-dev] GDAL GCPsToGeoTransform Problem

David Legault dlegault at vantpoint.com
Thu Feb 17 08:34:51 EST 2005


Hi,

Here is the little experience I've been doing with the GCPsToGeoTransform( )
GDAL function within the OpenEV application

The extracted GCPs come from a RadarSat Image file.

These are the GCPs given by :

imgds=gdal.Open( imgfile )
gcps = imgds.GetGCPs( )

1 (0.50P,0.50L) -> (-135.1095150E,69.8421120N,0.00)
2 (3075.50P,0.50L) -> (-134.6161190E,69.8693480N,0.00)
3 (6150.50P,0.50L) -> (-134.1211540E,69.8952230N,0.00)
4 (0.50P,2212.50L) -> (-135.0509610E,69.7197390N,0.00)
5 (3075.50P,2212.50L) -> (-134.5604000E,69.7469050N,0.00)
6 (6150.50P,2212.50L) -> (-134.0682890E,69.7727180N,0.00)
7 (0.50P,4424.50L) -> (-134.9928930E,69.5973540N,0.00)
8 (3075.50P,4424.50L) -> (-134.5051320E,69.6244510N,0.00)
9 (6150.50P,4424.50L) -> (-134.0158420E,69.6502040N,0.00)
10 (0.50P,6636.50L) -> (-134.9353020E,69.4749570N,0.00)
11 (3075.50P,6636.50L) -> (-134.4503100E,69.5019860N,0.00)
12 (6150.50P,6636.50L) -> (-133.9638050E,69.5276810N,0.00)
13 (0.50P,8848.50L) -> (-134.8781810E,69.3525470N,0.00)
14 (3075.50P,8848.50L) -> (-134.3959230E,69.3795100N,0.00)
15 (6150.50P,8848.50L) -> (-133.9121720E,69.4051470N,0.00)

Now I want to use the gdal.GCPsToGeoTransform( ) function to retreive the
Georeferencing information for these GCPs

First step is to convert the Lat/Longs to UTM coordinates in the correct
Datum

1 (0.50P,0.50L) -> (495787.8827608E,7748093.2830998N,0.00)
2 (3075.50P,0.50L) -> (514745.4777109E,7751173.2278477N,0.00)
3 (6150.50P,0.50L) -> (533715.4904099E,7754255.2492804N,0.00)
4 (0.50P,2212.50L) -> (498028.5699152E,7734443.4741512N,0.00)
5 (3075.50P,2212.50L) -> (516984.0291049E,7737533.2731664N,0.00)
6 (6150.50P,2212.50L) -> (535951.9736002E,7740625.0613713N,0.00)
7 (0.50P,4424.50L) -> (500276.5221832E,7720794.6708395N,0.00)
8 (3075.50P,4424.50L) -> (519229.8898777E,7723894.2612719N,0.00)
9 (6150.50P,4424.50L) -> (538195.7154961E,7726995.8751202N,0.00)
10 (0.50P,6636.50L) -> (502531.7368161E,7707146.8528349N,0.00)
11 (3075.50P,6636.50L) -> (521482.9247313E,7710256.1735550N,0.00)
12 (6150.50P,6636.50L) -> (540446.7202882E,7713367.6756985N,0.00)
13 (0.50P,8848.50L) -> (504794.1408911E,7693499.8886254N,0.00)
14 (3075.50P,8848.50L) -> (523743.2389120E,7696618.9937144N,0.00)
15 (6150.50P,8848.50L) -> (542704.9250019E,7699740.2243816N,0.00)

then use the gdal.GCPsToGeoTransform( gcps, 1 ) function to retreive the
calculated georeferencing data and I always get this

(-1.#IND, -1.#IND, 1.#INF, -1.#IND, -1.#IND, 1.#INF)

which tends to make me think there is something wrong with the calculation 
routine or the input parameters are not good (or any other reason).

But if I choose 3 points in all those (any 3 not aligned) the function does 
return some data (which I didn't check to see if it was correct or not)

Thank You

David

________________________________

VPI - Innovative Radar Solutions
________________________________

David Legault, M. Eng.
Signal Processing Specialist, Programer
Vantage Point International Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20050217/6cfc34ec/attachment.html


More information about the Gdal-dev mailing list