<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Frank,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">thanks a lot for you reply.&nbsp;Following your suggestion I computed the 2nd order polynomial that gives the following </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">coefficients for the 11013_1.KAP&nbsp;chart:</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">AMERIGO_WPX/3,-85.828910636818,0.001190746314,-0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">-0.000000000011,0.000000000000,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 <BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">AMERIGO_WPY/3,28.488998161095,0.000000000000,-0.001054118745,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">-0.000000000000,0.000000000000,-0.000000004663,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 <BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">AMERIGO_PWX/3,72129.011730414597,840.953171512958,0.000000007496,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.006662896373,0.000000000041,0.000000000089,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 <BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">AMERIGO_PWY/3,24103.153528890114,-0.000000052002,-744.892790806879,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000324,0.000000000031,3.549765907800,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000,0.000000000000 </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">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???)</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Anyway, the second order polynomial gives&nbsp;me a reasonable result and I'm going to use it&nbsp;for my software Amerigo&nbsp;(sourceforge.org/projects/amerigo).</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Also,&nbsp; since my software is for mobile devices (such as Smartphones with Windows CE&nbsp;today and hopefully Linux embedded in future),</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I'm a little bit concerned about using gdal projections and reprojection functions on ARM for performance&nbsp;and size reason.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">On the smartphone&nbsp;in&nbsp;fact I only use tiled tiff file&nbsp;with the polynomial tranformation. Files that I convert from BSB (or self calibrated raster)&nbsp;on the PC.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">In this way I just need to use (and link) gdal only for the PC of Amerigo, while on&nbsp;Windows CE I&nbsp;only use&nbsp;libtiff functions plus my onw </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT size=2>CRS_georef &nbsp;(a copy of the&nbsp;CRS_georef&nbsp;function in&nbsp;gdal_crs.c&nbsp;where it&nbsp;is a static function) thus keeping the size and the performance very reasonable.</FONT></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Maybe I'm wrong, but I already have the CPU of the smartphone very busy with all the calculations I make for the </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">GPS reading and tracking that I'm very concerned about addid other heavy calculations.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Do you have any experience on the other side of gdal used on mobile devices?</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Am I too concerend about the limted power of the ARM CPUs?</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Thanks in advance for any help</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Regards,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Marcello Ferrero<BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Frank Warmerdam &lt;warmerdam@pobox.com&gt;<BR>To: marcello ferrero &lt;marcello_ferrero@yahoo.com&gt;<BR>Cc: gdal-dev@lists.maptools.org<BR>Sent: Thursday, September 27, 2007 4:46:41 PM<BR>Subject: Re: [Gdal-dev] Affine Transformation and Calibration Equation for Maptech/BSB format<BR><BR>
<DIV>On 9/27/07, marcello ferrero &lt;marcello_ferrero@yahoo.com&gt; wrote:<BR>&gt; I believe the parameters for a more precise transformation are already in<BR>&gt; the BSB header in the WBX,WPY and PWX, PWY fields,<BR>&gt; but I'm not sure what are the correct data to use.<BR>&gt; For example if we consider the chart file 11013_1.KAP&nbsp;&nbsp;&nbsp;&nbsp; (STRAITS OF<BR>&gt; FLORIDA AND APPROACHES)<BR>&gt; the following values are in the header.<BR>&gt;<BR>&gt; WPX/3,74057.63283,914.1573321,-4.457688988e-006,0.9314526304,4.199727384e-007<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 8.909433511e-007,0.003888412047,4.049230257e-009,4.656999088e-009<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; -7.344637416e-009<BR>&gt; WPY/3,24849.77398,-0.0001719938458,-841.3888082,-2.236403169e-006<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; -4.23802978e-007,0.5645817982,-9.615822208e-009,-2.118680351e-009<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 1.85245272e-009,-0.05788953807<BR>&gt;
 PWX/3,-85.82846924,0.001190193579,1.242062009e-015,1.177436646e-010<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 4.828087799e-020,-4.158931771e-019,-7.813843316e-015,-1.938704561e-024<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; -3.205324874e-024,3.339741723e-023<BR>&gt; PWY/3,28.48799091,4.631711681e-016,-0.001052175742,-7.983285528e-020<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; -7.030373462e-020,-5.245662991e-009,4.239300639e-024,1.848231681e-024<BR>&gt;<BR>&gt; What are the parameters between them to take into account?<BR>&gt; Also, what kind of trasformation is this one? Is it a sort of calibration<BR>&gt; equations that uses also the ref points and errors contained in the same BSB<BR>&gt; file?<BR><BR>Marcello,<BR><BR>I do not know for sure, but I presume these parameters are for<BR>at least a 2nd order polynomial.&nbsp;&nbsp;I have made only a very<BR>minor effort to deduce these details but was not successful.<BR><BR>Internally GDAL can compute 2nd order polynomial
 warp<BR>equations from the reference points and this is what I<BR>generally encourage people to use (via gdalwarp) to<BR>convert the images to a nice "north up" image.&nbsp;&nbsp;But, in<BR>fact, I presume the files are actually normally in a mercator<BR>projection and that we would be even better off to work out<BR>the details of that and then use proper reprojection to get<BR>to other coordinate systems.<BR><BR>Best regards,<BR>-- <BR>---------------------------------------+--------------------------------------<BR>I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, warmerdam@pobox.com<BR>light and sound - activate the windows | <A href="http://pobox.com/~warmerdam" target=_blank>http://pobox.com/~warmerdam</A><BR>and watch the world go round - Rush&nbsp;&nbsp;&nbsp;&nbsp;| Geospatial Programmer for Rent</DIV></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR></DIV></div><br>
      <hr size=1>Be a better Globetrotter. <a href="http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3oDMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTklfMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545469">Get better travel answers </a>from someone who knows.<br>Yahoo! Answers - Check it out.

</body></html>