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

Minoru Akagi akaginch at gmail.com
Tue Nov 5 19:13:57 PST 2013


Hi Brent, Giovanni and Richard,

I can open an excel sheet as a point layer with a VRT file.
An example of vrt file:
---
<OGRVRTDataSource>
    <OGRVRTLayer name="points">
        <SrcDataSource>points.xls</SrcDataSource>
        <SrcLayer>Sheet1</SrcLayer>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>WGS84</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
    </OGRVRTLayer>
</OGRVRTDataSource>
---

XLS driver is read-only, but newly supported ODS [1] and XLSX [2]
drivers can also write. So we can edit spreadsheet directly in QGIS.
An tip to correctly add points into spreadsheet layer is including at
least one decimal in each x and y column in advance. Making x field
and y field uneditable in the properties dialog may lead to
comfortable editing.

[1] http://www.gdal.org/ogr/drv_ods.html
[2] http://www.gdal.org/ogr/drv_xlsx.html

Minoru



More information about the Qgis-user mailing list