[Qgis-user] Unable to open OGR .vrt file
Hi Even/Andre, After going through the OGR Virtual Format documentation again I realized that the GeometryField sub-element has an optional attribute called reportSrcColum. When set to FALSE (by default is set to TRUE) the source geometry fields (longitude and latitude columns in .csv file) will only be used to build the geometry of the features of the VRT layer but they will not be copied over to the attribute table in QGIS. In contrast if I use the default value the source geometry fields will only be copied over without building the geometry. Have I understood correctly? Modifying the following line it worked: GeometryField encoding=PointFromColumns reportSrcColumn=false x=longitude y=latitude/ Thanks again for your help Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Am 19.06.2014 23:59, schrieb Andrea Acinelli: Thanks for spotting that. After correcting the quotation the virtual layer loaded but without showing any features on the canvas or the attribute table. Same here. it is loaded as empty non-spatial table, because the source file has not been found. Not sure why there is no error message for that. After, as Even suggested, I modified the .vrt file including the relativeToVRT=1 attribute inSrcDataSource and layer gets loaded with all the features Same here. Ogr2ogr behaves a bit different than QGIS in that point. You can as well enter full path and file name to get it working. but all the points gets rendered on top of each at lat=0, long=0. Not for me. Meanwhile I have found the original dataset at: http://firms.modaps.eosdis.nasa.gov/active_fire/text/Global_24h.csv And the points appear all over the world. Maybe there is another typo in your dataset. Alternatively, you can try ogr2ogr Global_24h.shp Global_24h.vrt and see if that shows the points correctly. HTH, André Joost ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Unable to open OGR .vrt file
Andre/Even, Maybe I didn't explained it properly but by adding the reportSrcColumn=false attribute in GeometryField all points are displayed correctly all over the world in QGIS. GeometryField encoding=PointFromColumns reportSrcColumn=false x=longitude y=latitude/ Just wondering if what I described in the previous post is the expected behaviour. What do you think? Thanks a million Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Am 20.06.2014 17:22, schrieb Andrea Acinelli: Andre/Even, Maybe I didn't explained it properly but by adding the reportSrcColumn=false attribute in GeometryField all points are displayed correctly all over the world in QGIS. GeometryField encoding=PointFromColumns reportSrcColumn=false x=longitude y=latitude/ Just wondering if what I described in the previous post is the expected behaviour. What do you think? Well, it worked for me without reportSrcColumn, and I have never used that. Not sure why. Maybe because I am on Windows? Greetings, André Joost ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Unable to open OGR .vrt file
Hi, Thanks Andre. Your help is very much appreciated. Your last comment: Maybe there is another typo in your dataset. Alternatively, you can try ogr2ogr Global_24h.shp Global_24h.vrt and see if that shows the points correctly. I tried the ogr2ogr utility that came with PostGIS by Postgresql.app and the resulting shapefile loads correctly in QGIS. The .vrt file I converted is the unedited one (see below) without the relativeToVRT=1 and reportSrcColumn=false attributes: OGRVRTDataSource OGRVRTLayer name=Global_24h SrcDataSourceGlobal_24h.csv/SrcDataSource GeometryTypewkbPoint/GeometryType LayerSRSEPSG:4326/LayerSRS GeometryField encoding=PointFromColumns x=longitude y=latitude/ /OGRVRTLayer /OGRVRTDataSource The virtual file above seems to load correctly on windows as in your case. Can I ask other mac users to test the above .vrt file, the .csv can be downloaded from http://firms.modaps.eosdis.nasa.gov/active_fire/text/Global_24h.csv and see if they need to insert the additional attributes display the points? Thanks Andrea NOTE: This is my first support request and I noticed that I didn't reply properly. Almost all my mails represent a new thread. How do I replay so that my replays appear indented from the previous post etc..___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Am 21.06.2014 03:26, schrieb Andrea Acinelli: NOTE: This is my first support request and I noticed that I didn't reply properly. Almost all my mails represent a new thread. How do I replay so that my replays appear indented from the previous post etc.. It depends on how you get the mailing list. I read it in Thunderbird as a newsgroup via gmane, and a simple Reply sets the headers correctly. If you get the mailing list as simple mails, maybe Reply to all is the correct method. HTH, André Joost ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Hi Andre, Thanks for spotting that. After correcting the quotation the virtual layer loaded but without showing any features on the canvas or the attribute table. After, as Even suggested, I modified the .vrt file including the relativeToVRT=1 attribute in SrcDataSource and layer gets loaded with all the features but all the points gets rendered on top of each at lat=0, long=0. However in the attribute table each point has the correct lat/long values. Do you know what's going on now? Many thanks for your help. Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Am 19.06.2014 23:59, schrieb Andrea Acinelli: Hi Andre, Thanks for spotting that. After correcting the quotation the virtual layer loaded but without showing any features on the canvas or the attribute table. After, as Even suggested, I modified the .vrt file including the relativeToVRT=1 attribute inSrcDataSource and layer gets loaded with all the features but all the points gets rendered on top of each at lat=0, long=0. However in the attribute table each point has the correct lat/long values. Do you know what's going on now? Not really. Can you share part of the csv file? Greetings, André Joost ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Am 17.06.2014 00:46, schrieb Andrea Acinelli: 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’. take a close look at the line GeometryField encoding=PointFromColumns x=longitude y=latitude”/ The last quotation is not the same as the others. That's why it fails for me. HTH, André Joost ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Unable to open OGR .vrt file
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 SrcDataSourceGlobal_24h.csv/SrcDataSource GeometryTypewkbPoint/GeometryType LayerSRSEPSG: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 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Le mardi 17 juin 2014 00:46:42, Andrea Acinelli a écrit : 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 SrcDataSourceGlobal_24h.csv/SrcDataSource Try: SrcDataSource relativeToVRT=1Global_24h.csv/SrcDataSource GeometryTypewkbPoint/GeometryType LayerSRSEPSG: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 -- Geospatial professional services http://even.rouault.free.fr/services.html ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Unable to open OGR .vrt file
Hi, Thanks for your help. Unfortunately it didn't work. Is the relativeToVRT=1 attribute the same as specifying the full path in SrcDataSource? (It did't work anyway). It's a fresh installation. Thanks Andrea ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user