wiki:GMEDriver

Version 8 (modified by wolf, 10 years ago) ( diff )

--

OGR Google Maps Engine API driver

This project aims to implement an OGR driver for the Google Maps Engine API (GME API), to access the GME API vector table data as a vector file format. I'm also developing this driver as part of my course work for GIS Application Development course (Maa-123.3550 ) at Aalto University.

API Overview

The GME API gives access to data stored in GME. In addition to vector data you can also store imager and KML files in GME. We'll deal with those later in this project (maybe).

The HTTP requests are of the form:

 GET /tables/{tableId}/features

The API itself is a RESTfull API with a simple URL scheme. The data is delivered as GeoJSON, so the driver uses libjson from the GeoJSON driver. It will also use the OAuth2 code from the Google Fusion Tables Driver.

Using the GME Driver

This section will contain the most recent options for the driver. The driver honors these config params:

Config parameter comments
GOA2_CLIENT_ID The Apiary project Client ID
GOA2_CLIENT_SECRET The client secret from your Apiary project
GME_APIKEY The API key from your Apiary project
GME_REFRESH_TOKEN Generate the GME refresh token by running the swig/python/scripts/gdal_auth.py script

To read tables use this syntax

 "GME:tables='<tableId>' [select='<column1,column2,column3,gx_id,geometry>'] [where='<GME WHERE statement>'] [access='access token']"

To write tables use this syntax

 "GME:projectId='<GME projectId>'"

The driver also supports transactions and server side argument selection. The driver also supports filters, but not on geometry (TODO), those you have to either do client-side or add the where= argument. It's up to the user to make sure that the batchCreate and batchPatch calls have less than 50 elements (TODO to fix later).

Testing

I'll make a few GME tables available for testing purposes (still work in progress). I'm planning to use the GRASS GIS North Carolina data. However you can set up your own Maps Engine project for free.

Note: See TracWiki for help on using the wiki.