[Gdal-dev] Affine Transformation and Calibration Equation for Maptech/BSB format

marcello ferrero marcello_ferrero at yahoo.com
Fri Sep 28 17:03:50 EDT 2007


Frank,
thanks a lot for you reply. Following your suggestion I computed the 2nd order polynomial that gives the following 
coefficients for the 11013_1.KAP chart:

AMERIGO_WPX/3,-85.828910636818,0.001190746314,-0.000000000000,
-0.000000000011,0.000000000000,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 

AMERIGO_WPY/3,28.488998161095,0.000000000000,-0.001054118745,
-0.000000000000,0.000000000000,-0.000000004663,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 

AMERIGO_PWX/3,72129.011730414597,840.953171512958,0.000000007496,
0.006662896373,0.000000000041,0.000000000089,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 

AMERIGO_PWY/3,24103.153528890114,-0.000000052002,-744.892790806879,
0.000000000324,0.000000000031,3.549765907800,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,
0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 

As you see they are really different from those written in the original file. Maybe they use a very different equation (Spline with error correction???)
Anyway, the second order polynomial gives me a reasonable result and I'm going to use it for my software Amerigo (sourceforge.org/projects/amerigo).

Also,  since my software is for mobile devices (such as Smartphones with Windows CE today and hopefully Linux embedded in future),
I'm a little bit concerned about using gdal projections and reprojection functions on ARM for performance and size reason.
On the smartphone in fact I only use tiled tiff file with the polynomial tranformation. Files that I convert from BSB (or self calibrated raster) on the PC.
In this way I just need to use (and link) gdal only for the PC of Amerigo, while on Windows CE I only use libtiff functions plus my onw 
CRS_georef  (a copy of the CRS_georef function in gdal_crs.c where it is a static function) thus keeping the size and the performance very reasonable.

Maybe I'm wrong, but I already have the CPU of the smartphone very busy with all the calculations I make for the 
GPS reading and tracking that I'm very concerned about addid other heavy calculations.

Do you have any experience on the other side of gdal used on mobile devices?
Am I too concerend about the limted power of the ARM CPUs?


Thanks in advance for any help

Regards,

Marcello Ferrero

----- Original Message ----
From: Frank Warmerdam <warmerdam at pobox.com>
To: marcello ferrero <marcello_ferrero at yahoo.com>
Cc: gdal-dev at lists.maptools.org
Sent: Thursday, September 27, 2007 4:46:41 PM
Subject: Re: [Gdal-dev] Affine Transformation and Calibration Equation for Maptech/BSB format


On 9/27/07, marcello ferrero <marcello_ferrero at yahoo.com> wrote:
> I believe the parameters for a more precise transformation are already in
> the BSB header in the WBX,WPY and PWX, PWY fields,
> but I'm not sure what are the correct data to use.
> For example if we consider the chart file 11013_1.KAP     (STRAITS OF
> FLORIDA AND APPROACHES)
> the following values are in the header.
>
> WPX/3,74057.63283,914.1573321,-4.457688988e-006,0.9314526304,4.199727384e-007
>     8.909433511e-007,0.003888412047,4.049230257e-009,4.656999088e-009
>     -7.344637416e-009
> WPY/3,24849.77398,-0.0001719938458,-841.3888082,-2.236403169e-006
>     -4.23802978e-007,0.5645817982,-9.615822208e-009,-2.118680351e-009
>     1.85245272e-009,-0.05788953807
> PWX/3,-85.82846924,0.001190193579,1.242062009e-015,1.177436646e-010
>     4.828087799e-020,-4.158931771e-019,-7.813843316e-015,-1.938704561e-024
>     -3.205324874e-024,3.339741723e-023
> PWY/3,28.48799091,4.631711681e-016,-0.001052175742,-7.983285528e-020
>     -7.030373462e-020,-5.245662991e-009,4.239300639e-024,1.848231681e-024
>
> What are the parameters between them to take into account?
> Also, what kind of trasformation is this one? Is it a sort of calibration
> equations that uses also the ref points and errors contained in the same BSB
> file?

Marcello,

I do not know for sure, but I presume these parameters are for
at least a 2nd order polynomial.  I have made only a very
minor effort to deduce these details but was not successful.

Internally GDAL can compute 2nd order polynomial warp
equations from the reference points and this is what I
generally encourage people to use (via gdalwarp) to
convert the images to a nice "north up" image.  But, in
fact, I presume the files are actually normally in a mercator
projection and that we would be even better off to work out
the details of that and then use proper reprojection to get
to other coordinate systems.

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    | Geospatial Programmer for Rent


      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070928/e4359205/attachment.html


More information about the Gdal-dev mailing list