[Qgis-user] Unable to open OGR .vrt file

Andrea Acinelli aacinelli at gmail.com
Mon Jun 16 15:46:42 PDT 2014


Operating System: OS X 10.9.3
QGIS 2.2.0-9 distributed by KyngChaos
Postgres 9.3.4 & PostGIS 2.1.2 distributed by Postgres.app

Hi,

When trying to open a .vrt file referencing a .csv with 'lat' and ‘ ong’ in two separate columns I get the following error message: ‘Invalid Data Source: /Users/Andrea/postgis_cookbook/Chapter 1/global_24h.vrt is not a valid or recognized data source’.

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 mailing list, the QGIS User List and GIS StackExchange but could not find any. The following is the content of the .vrt file:

<OGRVRTDataSource>
    <OGRVRTLayer name="Global_24h">
        <SrcDataSource>Global_24h.csv</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>EPSG:4326</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="longitude" y="latitude”/>
    </OGRVRTLayer>
</OGRVRTDataSource>

NOTE: I’m able to read the file with the GDAL utility ogrinfo installed with PostGIS:
$ ogrinfo global_24h.vrt Global_24h -fid 1 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140616/b7d15f8c/attachment.html>


More information about the Qgis-user mailing list