One more question. I have now created the following vrt, but the DateTime is not parsed correctly. Are extra options available for the datetime object to tell ogr how it is formatted and thus, how it should be interpreted?<br>
<br><OGRVRTDataSource><br> <OGRVRTLayer name="test"><br> <SrcDataSource relativeToVRT="1">test.csv</SrcDataSource><br> <GeometryType>wkbPoint</GeometryType><br>
<LayerSRS>EPSG:28992</LayerSRS><br> <GeometryField encoding="PointFromColumns" x="T X Coord Loc" y="T Y Coord Loc"/><br> <Field name="Incident Id" type="Integer" /><br>
<Field name="Nr Incident" type="Integer" /><br> <Field name="Dtg Start Incident" type="DateTime" /><br> <Field name="Dtg Einde Incident" type="DateTime" /><br>
<Field name="Brw Melding Cl" type="String" /><br> <Field name="Brw Melding Cl1" type="String" /><br> <Field name="Brw Melding Cl2" type="String" /><br>
<Field name="Naam Locatie1" type="String" /><br> <Field name="Postcode4pp" type="String" /><br> <Field name="Plaats Naam" type="String" /><br>
<Field name="Gemeente Naam" type="String" /><br> </OGRVRTLayer><br></OGRVRTDataSource><br><br><br><br><div class="gmail_quote">2011/2/23 Milo van der Linden <span dir="ltr"><<a href="mailto:milo@dogodigi.net">milo@dogodigi.net</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks! Nice tip! I have read the documentation and will play arround with setting the datatypes for my columns too, this will give me the ability to do thematic mapping right on the csv!<br>
<br><div class="gmail_quote"><div class="im">2011/2/23 Richard Duivenvoorde <span dir="ltr"><<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>></span><br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Milo van der Linden wrote:<br>
</div><div><div></div><div class="h5"><div>> Shouldn't it go to the dev list if the absolute path is required? I<br>
> think that assuming the vrt and the csv are in the same dir should be<br>
> the first check as ogr2ogr has no problem with it.<br>
<br>
</div>Hi Milo,<br>
<br>
I had a look at the docs of ogr vrt driver:<br>
<a href="http://www.gdal.org/ogr/drv_vrt.html" target="_blank">http://www.gdal.org/ogr/drv_vrt.html</a><br>
<br>
it's not really necessary to use the full path, you can add a attribute<br>
relativeToVRT="1" to the SrcDataSource element:<br>
<br>
<SrcDataSource relativeToVRT="1">test.csv</SrcDataSource><br>
instead of<br>
<SrcDataSource>test.csv</SrcDataSource><br>
<br>
this makes your vrt-definition also work in qgis without an absolute<br>
path. (don't know why a relative path is working for ogr2ogr though ...)<br>
<br>
Regards,<br>
<font color="#888888"><br>
Richard<br>
</font></div></div></blockquote></div><br>
</blockquote></div><div style="margin: 0pt;" name="sig_3ae25cf131"></div><br>