[Qgis-user] How do I georeference an xls file opened in QGIS 2.0
Minoru Akagi
akaginch at gmail.com
Tue Nov 5 22:42:29 PST 2013
If source file is not in current working directory or the path is not
absolute path, "relativeToVRT" is necessary.
<SrcDataSource relativeToVRT="1">points.xls</SrcDataSource>
Cheers,
Minoru
2013/11/6 Minoru Akagi <akaginch at gmail.com>:
> 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