<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
why not use a vrt file instead! <a class="moz-txt-link-freetext" 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>
<br>
<div class="moz-cite-prefix">On 16-04-25 08:01 AM,
<a class="moz-txt-link-abbreviated" href="mailto:Steve.Toutant@inspq.qc.ca">Steve.Toutant@inspq.qc.ca</a> wrote:<br>
</div>
<blockquote
cite="mid:OF834F0A78.DF20F669-ON85257FA0.0041B50A-85257FA0.00420CA7@isn.rtss.qc.ca"
type="cite"><font size="2" face="sans-serif">I don't know why </font><tt><font
size="2">LABELITEM
'filed_3' would not work in your case</font></tt>
<br>
<br>
<font size="2" face="sans-serif">You can try to specify column
names
by using a .csvt file</font>
<br>
<a moz-do-not-send="true" href="http://www.gdal.org/drv_csv.html"><font
size="2" face="sans-serif" color="blue">http://www.gdal.org/drv_csv.html</font></a>
<br>
<br>
<font size="2" face="sans-serif">Example: </font><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/"><font
size="2" face="sans-serif" color="blue"><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></font></a>
<br>
<br>
<br>
<p>
<br>
<br>
<br>
<table style="border-collapse:collapse;" width="100%">
<tbody>
<tr valign="top" height="8">
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px 0px
0px;padding:0px 0px;" width="40%"><font size="1"
face="sans-serif"><b>Ian
Walberg
<a class="moz-txt-link-rfc2396E" href="mailto:ian.walberg@airborne.aero"><ian.walberg@airborne.aero></a>@lists.osgeo.org</b>
</font>
<br>
<font size="1" face="sans-serif">Envoyé par :
"mapserver-users"
<a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users-bounces@lists.osgeo.org"><mapserver-users-bounces@lists.osgeo.org></a></font>
<p><font size="1" face="sans-serif">2016-04-23 22:50</font>
</p>
</td>
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px 0px
0px;padding:0px 0px;" width="59%">
<table style="border-collapse:collapse;" width="100%">
<tbody>
<tr valign="top" height="21">
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;" width="57">
<div align="right"><font size="1"
face="sans-serif">A</font></div>
</td>
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;"><font size="1"
face="sans-serif"><a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users@lists.osgeo.org">"mapserver-users@lists.osgeo.org"</a>
<a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users@lists.osgeo.org"><mapserver-users@lists.osgeo.org></a></font>
</td>
</tr>
<tr valign="top" height="21">
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;" width="57">
<div align="right"><font size="1"
face="sans-serif">cc</font></div>
</td>
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;">
<br>
</td>
</tr>
<tr valign="top" height="21">
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;" width="57">
<div align="right"><font size="1"
face="sans-serif">Objet</font></div>
</td>
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;"><font size="1"
face="sans-serif">[mapserver-users]
OGR csv - no field names</font></td>
</tr>
</tbody>
</table>
<br>
<table style="border-collapse:collapse;" width="393">
<tbody>
<tr valign="top" height="8">
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;" width="57">
<br>
</td>
<td style="border-style:none none none
none;border-color:#000000;border-width:0px 0px
0px 0px;padding:0px 0px;" width="336"><br>
</td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
<br>
<br>
<tt><font size="2">Folks,<br>
<br>
Can a csv file with no field names as the first row be used
as an OGR source?<br>
<br>
GDAL creates dummy field names, are these passed to
mapserver?<br>
<br>
OGRFeature(USA-Hilton):652<br>
field_1 (String) = -74.16958<br>
field_2 (String) = 40.73526<br>
field_3 (String) = Penn Station<br>
<br>
What do we need in the layer to make this work?<br>
<br>
LABELITEM 'name' - this throws an error, 'field_3' does not
seem to work
either.<br>
CONNECTIONTYPE OGR<br>
CONNECTION 'Stations.csv'<br>
<br>
Thanks<br>
<br>
Ian<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
</font></tt><a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"><tt><font
size="2">http://lists.osgeo.org/mailman/listinfo/mapserver-users</font></tt></a>
<br>
<br>
<br>
<br>
</p>
<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>