<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><!--?xml version="1.0" encoding="UTF-8" standalone="no"?--><div style="font-family: 'Courier New'; font-size: medium;"><div><span style="font-family: 'courier new', courier, monospace;">Operating System: OS X 10.9.3</span><br></div><div><span style="font-family: 'courier new', courier, monospace;">QGIS 2.2.0-9 </span><span style="font-family: 'courier new', courier, monospace;">distribut</span><span style="font-family: 'courier new', courier, monospace;">ed by KyngChaos</span></div><div><span style="font-family: 'courier new', courier, monospace;">Postgres 9.3.4 & PostGIS 2.1.2 distributed by Postgres.app</span></div><div><span style="font-family: 'courier new', courier, monospace;"><br></span></div><div><font face="courier new, courier, monospace">Hi,</font></div><div><font face="courier new, courier, monospace"><br></font></div><div><font face="courier new, courier, monospace">When trying to open a .vrt file referencing a .csv with 'lat' and ‘ ong’ in two separate columns I get the following error message: ‘</font>Invalid Data Source: /Users/Andrea/postgis_cookbook/Chapter 1/<font face="courier new, courier, monospace">global_24h</font>.vrt is not a valid or recognized data source<font face="courier new, courier, monospace">’.</font>
</div></div><div style="font-family: 'Courier New'; font-size: medium;"><font face="courier new, courier, monospace"><br></font></div><div style="font-family: 'Courier New'; font-size: medium;"><font face="courier new, courier, monospace">Virtual file and .csv file are in the same directory. I did my homework and tried to search for answers to similar questions in this </font><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user">mailing list</a><font face="courier new, courier, monospace">, the </font><a href="http://osgeo-org.1560.x6.nabble.com/Quantum-GIS-User-f4125267.html">QGIS User List</a><font face="courier new, courier, monospace"> and </font><a href="http://gis.stackexchange.com/">GIS StackExchange</a> but could not find any. The following is the content of the .vrt file:
</div><div style="font-family: 'Courier New'; font-size: medium;"><br></div><div style="font-family: 'Courier New'; font-size: medium;"><div xmlns="http://www.w3.org/1999/xhtml"><OGRVRTDataSource>
</div><div xmlns="http://www.w3.org/1999/xhtml">    <OGRVRTLayer name="Global_24h">
</div><div xmlns="http://www.w3.org/1999/xhtml">        <SrcDataSource>Global_24h.csv</SrcDataSource>
</div><div xmlns="http://www.w3.org/1999/xhtml">        <GeometryType>wkbPoint</GeometryType>
</div><div xmlns="http://www.w3.org/1999/xhtml">        <LayerSRS>EPSG:4326</LayerSRS>
</div><div xmlns="http://www.w3.org/1999/xhtml">        <GeometryField encoding="PointFromColumns" x="longitude" y="latitude”/>
</div><div xmlns="http://www.w3.org/1999/xhtml">    </OGRVRTLayer>
</div><div xmlns="http://www.w3.org/1999/xhtml"></OGRVRTDataSource>
</div></div><div style="font-family: 'Courier New'; font-size: medium;"><font face="courier new, courier, monospace"><br></font></div><div style="font-family: 'Courier New'; font-size: medium;"><font face="courier new, courier, monospace">NOTE: I’m able to read the file with the GDAL utility </font>ogrinfo installed with PostGIS:
</div><div xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Courier New'; font-size: medium;">$ ogrinfo global_24h.vrt Global_24h -fid 1 </div></body></html>