OGR Google Maps Engine API driver

Google Maps Engine was lights out as of January, 2016. -Kurt Schwehr (goatbar)

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/ script
GME_ACCESS_TOKEN Re-use an already created access token. Same as the access parameter below.

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 attribute and spatial filters. Spatial filters get translated into the intersects= parameter, since that's the way to make the API more useful, and bring down the query costs. You can specify a Point, LineString or a Polygon as a Spatial filter. Any other type is then handled on the client side. It's up to the user to make sure that the batchCreate and batchPatch calls have less than 50 elements (TODO to fix later). TODO: Dynamic QPS throttling.


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.

Last modified 7 years ago Last modified on Jan 26, 2017, 7:55:35 AM
Note: See TracWiki for help on using the wiki.