Le mardi 29 octobre 2013 00:24:37, Wolf Bergenheim a écrit : > Hi all, > > I'm working on the GDAL Google Maps Engine (GME) driver over then next few > months for a school project. I've set up a wiki page for it where you can > track my progress. It's here: > > http://trac.osgeo.org/gdal/wiki/GMEDriver > > I'm picking up from where Frank and I left off a few months ago. > > For now we have a mapping that mimics the Fusion Tables setup, which is > that each OGRGMEDataSource corresponds to a single session, and each > OGRGMELayer corresponds to a table. This works fine, but GME can do more! > :) > > GME has a concept of a map which contains layers, each layer has a 1:1 > relationship with a vector table. Now my proposal is to extend the previous > model so that if the user of the library specifies a map instead of a > table, we change the mapping so that the OGRGMEDatasource maps to the map > and contains several OGRGMELayers which each correspond to each table. Then > I would move the connection logic out of OGRGMEDatasource to OGRGMEDriver, > which is currently basically only boilerplate code.
Wolf, I don't know the GME API, so the following might be non relevant, but I'm wondering why you couldn't keep the current connection logic. You would "just" need to establish the list of vector tables from a "GetMapContent" request (or whatever it is called) and you would instanciate the layers just as you do currently by parsing the "tables" option. I'm probably missing something ? > Is there a precedence > for this type of configuration in any other driver? The boilerplate code is quite typical of the standard OGR driver. You would need/want a shared connection among different OGRGMEDataSource ? That would be the point of moving it at the driver level. Actually I've coded something like that in the FGDB driver since there's a bug in the underlying SDK and you cannot open simultaneously several connections to the same datasource. > > What do you think would this kind of added mapping be worth the extra > effort? I'm trying to make the classes as lean as possible, because I might > have a need to pull out all the map/layer handling code so that I can > re-use it later for another driver. Also I think that the connection > management / request throttling code could be usable elsewhere. Another driver using OAuth2 or those GME concepts in a brother driver ? I have some troubles imagining what you have in mind, not having dug myself into the topic. Even -- Geospatial professional services http://even.rouault.free.fr/services.html _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
