<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>Im trying to use ogr&#8217;s mysql
driver to create a points layer that will be converted to an imagemap.<br>
Im using the following template to create the imagemap:<br>
&nbsp;<br>
&lt;map id=&quot;mymap&quot; name=&quot;mymap&quot;&gt;<br>
[resultset layer=mypoints]<br>
[feature]<br>
&lt;area shape=&quot;circle&quot; coords=&quot;[shpxy precision=0 proj=image
yf=&quot;,7&quot; xf=&quot;,&quot;]&quot; title=&quot;[buoyName]-[lat],[lon]&quot;
href=&quot;#&quot; alt=&quot;[buoyName]-[lat],[lon]&quot;&gt;<br>
[/feature]<br>
[/resultset]<br>
&lt;map&gt;<br>
&nbsp;<br>
&nbsp;<br>
the problem is that ogr pads numeric mysql fields with a very large amount of
whitespace. Here is some of my output:<br>
&nbsp;<br>
&lt;area <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
shape=&quot;circle&quot; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
coords=&quot;178,274,7&quot; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
title=&quot;42055:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2@&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
160&quot; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
href=&quot;#&quot; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
alt=&quot;42055:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2@&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
160&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 color="#444444"
face="Times New Roman"><span style='font-size:12.0pt;color:#444444'>/&gt;<br>
&nbsp;<br>
the (double) numeric fields [lat] and [lon] are being left-padded with a lot of
whitespace (each field is 22 spaces long in total).<br>
running my ovf file from the command line with ogrinfo produces the same
result; a lot of unecessary left-padding.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>OGRFeature(mypoints):88<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; max(recTS) (Integer) = 1238258520<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; buoyName (String) = 41114<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; lat (Real)
=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
28<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; lon (Real)
=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-80<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; MAG (Real)
=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-371<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; WDIR (Real)
=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-99<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; WSPD (Real)
=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-99<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; ADIR (Real)
=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
81<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; ts (DateTime) = 2009/03/13
11:42:00<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp; POINT (-80.219999999999999 27.55
0)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>Ogr&#8217;s output also shows the
20+space left-padding for the double&amp;int fields.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>Im trying to access my imagemap using a
url in this format:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><a
href="http://localhost/cgi-bin/mapserv?map=/data/www/html/test/test.map&amp;mode=nquery&amp;searchmap=true">http://localhost/cgi-bin/mapserv?map=/data/www/html/test/test.map&amp;mode=nquery&amp;searchmap=true</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>I also tried embedding php code to try
to preprocess the variables:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&lt;map id=&quot;mymap&quot;
name=&quot;mymap&quot;&gt;<br>
[resultset layer=mypoints]<br>
[feature]<br>
&lt;area shape=&quot;circle&quot; coords=&quot;[shpxy precision=0 proj=image
yf=&quot;,7&quot; xf=&quot;,&quot;]&quot; title=&quot;[buoyName]-<b><span
style='font-weight:bold'>&lt;?php trim([lat]):&gt;,[</span></b>lon]&quot;
href=&quot;#&quot; alt=&quot;[buoyName]-[lat],[lon]&quot;&gt;<br>
[/feature]<br>
[/resultset]<br>
&lt;map&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>&nbsp;but this obviously didn&#8217;t
work, Im assuming since cgi was processing &amp; returning the results, so php
was never even called upon.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>Questions:<br>
How can I remove this padding? <br>
Is this padding by design, or a bug in ogrinfo?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'>Is there any other way that I can
pre-process these variables prior to sending them to the browser, (using php or
some other means) so that I can process&amp;format them based on my needs?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color="#444444" face="Times New Roman"><span
style='font-size:12.0pt;color:#444444'><br>
Please help,<br>
Thanks,<br>
P.Romero</span></font><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p></o:p></span></font></p>

</div>

</body>

</html>