[Qgis-developer] Spatialize attribute columns XY oor WKT, design choice

Matthias Kuhn matthias.kuhn at gmx.ch
Tue Feb 18 23:16:51 PST 2014


Recently there was a discussion on IRC between NathanW and EvenR 
concerning SQLite's virtual table [1]
I think this would be a (mighty) generic approach which could also 
serve this use case. I didn't give it much deeper thoughts yet, but I 
must admit it looks promising. Basically you just register a new table 
with SQLite and implement the backend for it. This gives you all the 
SQLite power (where we even have a driver for already) and therefore 
database goodies tailor suited to runtime-generated data.

I also had the idea of creating such tables on the fly for iterators 
spanning multiple tables (for JOIN support in queries. Providing a 
provider-independent highlevel query syntax like expressions). If we do 
this I would like to make sure that we have the possibility to get 
access to the parsed query before it is executed. This is necessary to 
be able to optimize the query for databases for which we have our own 
drivers and which support such operations natively (Think of a join of 
two possibly huge postgres tables: you don't want to join them 
locally). I haven't yet verified if this is possible or not, and can 
therefore not say if this approach fulfils the requirements.

There are python bindings available for virtual tables, so it may be 
possible to implement it this way [2] I think it would be good to 
gather some experience in this direction before implementing it in 
core. I am not even sure how it plays with SpatiaLite.


[1] https://www.sqlite.org/vtab.html
[2] http://apidoc.apsw.googlecode.com/hg/vtable.html

On Tue 18 Feb 2014 05:59:29 PM CET, Régis Haubourg wrote:
> Hi Hugo,
> I like the idea!
> Sounds clear to me. if core commiters agree, that would be nice to start
> such a work for 2.4.
> any objection?
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Spatialize-attribute-columns-XY-oor-WKT-design-choice-tp5104209p5104521.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

More information about the Qgis-developer mailing list