[Qgis-user] How do I georeference an xls file opened in QGIS 2.0

Lee Hachadoorian Lee.Hachadoorian+L at gmail.com
Tue Nov 5 16:39:44 PST 2013


David,

Is there any chance your GDAL/OGR lacks Excel support? According to OGR 
Formats page [1], it isn't compiled by default. Try `ogrinfo <your 
file>` from the command line.

I can confirm that it is working for me (QGIS 2.0.1, GDAL 1.10.0, Linux 
Mint 13) via the Add Vector Layer dialog (as described by Brent) and via 
drag and drop from the file system, as you describe in your original 
post. (Even without Richard's excellent XYTools plugin.)

Best,
--Lee

[1] http://www.gdal.org/ogr/ogr_formats.html

On 11/05/2013 03:38 PM, Richard Duivenvoorde wrote:
> On 05-11-13 20:41, Brent Wood wrote:
>> Cheers...
>>
>> I don't want to create shapefiles or csv's, etc, from spreadsheets,  I
>> just want to plot *.xls files which contain x/y columns on the map.
>>
>> I sort of figured that if a GIS tool can open an xls file this would be
>> pretty basic functionality... perhaps optimistically :-)
>>
>> The use case I'm envisaging is a live Excel spreadsheet used to store
>> data. New rows (records) are added as appropriate. A QGIS project
>> includes the spreadsheet as a current layer - so a QGIS user can open
>> the spreadsheet, as well as other map layers, & save the project.
>> Reopening the project would automatically plot all the rows in the
>> spreadsheet on the map.
>>
>> The only ways I can see to achieve this functionality involve recreating
>> another copy of the spreadsheet in another format before I can view the
>> points on the map. Which is an annoying extra few steps every time I
>> want to view the spreadsheet.
>>
>> Is this worth filing a ticket for? Perhaps add some extra functionality
>> in the vector layer dialogue: if the file type opened is an xls, allow
>> the user to (optionally) specify the column identifiers for the X & Y
>> coords & the SRID to apply?
> Hi,
>
> my xytools plugin does parts of your question:
> - it can load an xls file (xlr module needed), will ask you for a crs
> and the x and y column, and then will create features and place those in
> a memory layer (!). Which you could save to ... whatever
> But as this is a memorylayer the link to your excelfile is not
> memorized, so loading excel file in a project file is not working.
>
> Second option: as OGR  can load excel files, QGIS can load them as
> tables (just via 'add vector layer'). Maybe (!, haven't tried this) you
> can use the vrt-magic from ogr for this.
> See http://www.gdal.org/ogr/drv_vrt.html
> This would mean that your excel file would be accompanied by this xml
> file which defines the columns and geometrytype. And OGR (and by this
> hopefully QGIS) will then see it as a 'virtual' geometry containing
> file. Please try (and report back ;-) )
>
> Third option: instead of real excell files,
> use csv files (combined with vrt?) See
> http://www.gdal.org/ogr/drv_csv.html
>
> The Delimited Text File layer is also pretty sophisticated nowadays!
>
> Hope this helps.
>
> Regards,
>
> Richard Duivenvoorde
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>

-- 
Lee Hachadoorian
Assistant Professor in Geography, Dartmouth College
http://freecity.commons.gc.cuny.edu




More information about the Qgis-user mailing list