<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    really not sure CSVT file is supported by ogr, but you can easily
    define field type in VRT<br>
    <br>
            <Field name="precipitation_mm" src="prec_mm"
    type="Real"/><br>
            <Field name="field_1" src="field_1" type="String"
    width="100" /><br>
    <br>
    <div class="moz-cite-prefix">On 16-04-25 04:32 PM, Ian Walberg
      wrote:<br>
    </div>
    <blockquote
      cite="mid:b1f35c2d7c5649df9ee67698aa16e97f@airborne.aero"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">Thanks
            for the ideas.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">I
            think the vrt file needs the csv fields to have names unless
            I misunderstand.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">CSVT
            file – does this specify the column/field data type? Can the
            name be specified as well?<o:p></o:p></span></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"><o:p> </o:p></span></a></p>
        <p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">Regards<o:p></o:p></span></span></p>
        <p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"><o:p> </o:p></span></span></p>
        <p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">Ian<o:p></o:p></span></span></p>
        <p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"><o:p> </o:p></span></span></p>
        <span style="mso-bookmark:_MailEndCompose"></span>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">
                Simon Mercier [<a class="moz-txt-link-freetext" href="mailto:smercier@mapgears.com">mailto:smercier@mapgears.com</a>]
                <br>
                <b>Sent:</b> Monday, April 25, 2016 10:31 AM<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a>; Ian Walberg
                <a class="moz-txt-link-rfc2396E" href="mailto:ian.walberg@airborne.aero"><ian.walberg@airborne.aero></a><br>
                <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>;
                mapserver-users
                <a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users-bounces@lists.osgeo.org"><mapserver-users-bounces@lists.osgeo.org></a><br>
                <b>Subject:</b> Re: [mapserver-users] RE OGR csv - no
                field names<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt">why not use a
          vrt file instead! 
          <a moz-do-not-send="true"
            href="http://www.gdal.org/drv_vrt.html">http://www.gdal.org/drv_vrt.html</a><br>
          <br>
          <OGRVRTDataSource><br>
              <OGRVRTLayer name="precipitation"><br>
                 
          <SrcDataSource>precipitation.csv</SrcDataSource><br>
                  <GeometryType>wkbPoint</GeometryType><br>
                  <LayerSRS>EPSG:4326</LayerSRS><br>
                  <GeometryField encoding="PointFromColumns" x="lon"
          y="lat"/><br>
                  <Field name="precipitation_mm" src="prec_mm"/><br>
              </OGRVRTLayer><br>
          </OGRVRTDataSource><br>
          <br>
          <br>
          <o:p></o:p></p>
        <div>
          <p class="MsoNormal">On 16-04-25 08:01 AM, <a
              moz-do-not-send="true"
              href="mailto:Steve.Toutant@inspq.qc.ca">
              <a class="moz-txt-link-abbreviated" href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a></a> wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="font-size:10.0pt;font-family:"Arial",sans-serif">I
              don't know why
            </span><tt><span style="font-size:10.0pt">LABELITEM
                'filed_3' would not work in your case</span></tt>
            <br>
            <br>
            <span
              style="font-size:10.0pt;font-family:"Arial",sans-serif">You
              can try to specify column names by using a  .csvt file</span>
            <br>
            <a moz-do-not-send="true"
              href="http://www.gdal.org/drv_csv.html"><span
                style="font-size:10.0pt;font-family:"Arial",sans-serif">http://www.gdal.org/drv_csv.html</span></a>
            <br>
            <br>
            <span
              style="font-size:10.0pt;font-family:"Arial",sans-serif">Example:
            </span><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue"><a
                moz-do-not-send="true"
href="https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/"><a class="moz-txt-link-freetext" href="https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/">https://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/</a></a></span>
            <br>
            <br>
            <o:p></o:p></p>
          <p style="margin-bottom:12.0pt"><br>
            <br>
            <o:p></o:p></p>
          <table class="MsoNormalTable"
            style="width:100.0%;border-collapse:collapse" width="100%"
            border="0" cellpadding="0" cellspacing="0">
            <tbody>
              <tr style="height:4.8pt">
                <td style="width:40.0%;padding:0in 0in 0in
                  0in;height:4.8pt" valign="top" width="40%">
                  <p class="MsoNormal"><b><span
                        style="font-size:7.5pt;font-family:"Arial",sans-serif">Ian
                        Walberg
                        <a moz-do-not-send="true"
                          href="mailto:ian.walberg@airborne.aero"><ian.walberg@airborne.aero></a>@lists.osgeo.org</span></b><span
style="font-size:7.5pt;font-family:"Arial",sans-serif">
                    </span><br>
                    <span
                      style="font-size:7.5pt;font-family:"Arial",sans-serif">Envoyé
                      par : "mapserver-users"
                      <a moz-do-not-send="true"
                        href="mailto:mapserver-users-bounces@lists.osgeo.org"><mapserver-users-bounces@lists.osgeo.org></a></span>
                    <o:p></o:p></p>
                  <p><span
                      style="font-size:7.5pt;font-family:"Arial",sans-serif">2016-04-23
                      22:50</span>
                    <o:p></o:p></p>
                </td>
                <td style="width:59.0%;padding:0in 0in 0in
                  0in;height:4.8pt" valign="top" width="59%">
                  <table class="MsoNormalTable"
                    style="width:100.0%;border-collapse:collapse"
                    width="100%" border="0" cellpadding="0"
                    cellspacing="0">
                    <tbody>
                      <tr style="height:12.6pt">
                        <td style="width:42.75pt;padding:0in 0in 0in
                          0in;height:12.6pt" valign="top" width="57">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><span
                              style="font-size:7.5pt;font-family:"Arial",sans-serif">A</span><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in
                          0in;height:12.6pt" valign="top">
                          <p class="MsoNormal"><span
                              style="font-size:7.5pt;font-family:"Arial",sans-serif"><a
                                moz-do-not-send="true"
                                href="mailto:mapserver-users@lists.osgeo.org"><a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users@lists.osgeo.org">"mapserver-users@lists.osgeo.org"</a></a>
                              <a moz-do-not-send="true"
                                href="mailto:mapserver-users@lists.osgeo.org"><mapserver-users@lists.osgeo.org></a></span>
                            <o:p></o:p></p>
                        </td>
                      </tr>
                      <tr style="height:12.6pt">
                        <td style="width:42.75pt;padding:0in 0in 0in
                          0in;height:12.6pt" valign="top" width="57">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><span
                              style="font-size:7.5pt;font-family:"Arial",sans-serif">cc</span><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in
                          0in;height:12.6pt" valign="top"><br>
                        </td>
                      </tr>
                      <tr style="height:12.6pt">
                        <td style="width:42.75pt;padding:0in 0in 0in
                          0in;height:12.6pt" valign="top" width="57">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><span
                              style="font-size:7.5pt;font-family:"Arial",sans-serif">Objet</span><o:p></o:p></p>
                        </td>
                        <td style="padding:0in 0in 0in
                          0in;height:12.6pt" valign="top">
                          <p class="MsoNormal"><span
                              style="font-size:7.5pt;font-family:"Arial",sans-serif">[mapserver-users]
                              OGR csv - no field names</span><o:p></o:p></p>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                  <p class="MsoNormal"><o:p> </o:p></p>
                  <table class="MsoNormalTable"
                    style="width:294.75pt;border-collapse:collapse"
                    width="393" border="0" cellpadding="0"
                    cellspacing="0">
                    <tbody>
                      <tr style="height:4.8pt">
                        <td style="width:42.75pt;padding:0in 0in 0in
                          0in;height:4.8pt" valign="top" width="57">
                          <br>
                        </td>
                        <td style="width:3.5in;padding:0in 0in 0in
                          0in;height:4.8pt" valign="top" width="336">
                          <br>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
            </tbody>
          </table>
          <p style="margin-bottom:12.0pt"><br>
            <br>
            <br>
            <br>
            <br>
            <tt><span style="font-size:10.0pt">Folks,</span></tt><span
              style="font-size:10.0pt;font-family:"Courier
              New""><br>
              <br>
              <tt>Can a csv file with no field names as the first row be
                used as an OGR source?</tt><br>
              <br>
              <tt>GDAL creates dummy field names, are these passed to
                mapserver?</tt><br>
              <br>
              <tt>OGRFeature(USA-Hilton):652</tt><br>
              <tt> field_1 (String) = -74.16958</tt><br>
              <tt> field_2 (String) =  40.73526</tt><br>
              <tt> field_3 (String) =  Penn Station</tt><br>
              <br>
              <tt>What do we need in the layer to make this work?</tt><br>
              <br>
              <tt>LABELITEM 'name' - this throws an error, 'field_3'
                does not seem to work either.</tt><br>
              <tt>CONNECTIONTYPE OGR</tt><br>
              <tt>CONNECTION 'Stations.csv'</tt><br>
              <br>
              <tt>Thanks</tt><br>
              <br>
              <tt>Ian</tt><br>
              <tt>_______________________________________________</tt><br>
              <tt>mapserver-users mailing list</tt><br>
              <tt><a moz-do-not-send="true"
                  href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a></tt><br>
            </span><a moz-do-not-send="true"
              href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"><tt><span
                  style="font-size:10.0pt">http://lists.osgeo.org/mailman/listinfo/mapserver-users</span></tt></a>
            <br>
            <br>
            <br>
            <o:p></o:p></p>
          <p class="MsoNormal"><br>
            <br>
            <o:p></o:p></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>mapserver-users mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><br>
          <br>
          <o:p></o:p></p>
        <pre>-- <o:p></o:p></pre>
        <pre>simon mercier<o:p></o:p></pre>
        <pre>mapgears<o:p></o:p></pre>
        <pre>+1.418.476.7139 p101<o:p></o:p></pre>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
simon mercier
mapgears
+1.418.476.7139 p101</pre>
  </body>
</html>