Sunday, September 4, 2011

Google Fusion Tables in QGIS

Since version 1.9 (currently still in trunk) OGR supports Google Fusion Tables. There are instructions online available that show how to upload Shapefiles to Google Fusion Tables using OGR e.g. a video from the Google I/O conference (starting at 26:30 with an introduction to GDAL/OGR).

Since QGIS has an OGR provider I wanted to display a Google Fusion table (with spatial data) in QGIS. It can be done quite easily using a Virtual Format layer that looks as follows:

<OGRVRTDataSource>
  <OGRVRTLayer name="osm_places">
    <SrcDataSource>
      GFT:email=youremail password=yourpassword
    </SrcDataSource>
    <SrcLayer>osm_places</SrcLayer>
  </OGRVRTLayer>
</OGRVRTDataSource>
The Virtual Format layer can be loaded like any file-based vector layer. Editing and identifying work also as usual:
Identify a feature
To get that work it is necessary to compile QGIS with the latest (unstable) OGR library.

1 comment: