[Qgis-developer] Spatialite views not working in QGIS
Stefan Keller
sfkeller at gmail.com
Fri Apr 29 09:32:05 EDT 2011
Sandro
You wrote:
> c) accordingly to all this, SpatiaLite defines any
> Spatial VIEW on VIEWS_GEOMETRY_COLUMNS (not on
> GEOMETRY_COLUMNS): and this allows to fully support
> Spatial Index for VIEWs as well
Cool! So, what can I do?
Just replace this statement:
<< INSERT INTO GEOMETRY_COLUMNS VALUES ('Towns_v1', 'Geometry',
'POINT', 2, 32632, 0);
to this?
>> INSERT INTO VIEWS_GEOMETRY_COLUMNS VALUES ('Towns_v1', 'Geometry', 'POINT', 2, 32632, 0);
Yours, S.
2011/4/29 <a.furieri at lqt.it>:
> On Fri, 29 Apr 2011 09:33:42 +0200, Stefan Keller wrote
>
>> SQLite claims to be a mostly SQL compliant database and offers views.
>> So if views are there and work ... why should'nt this work in QGIS?
>>
>
> Hi Stefan,
>
> quick answer, but exhaustive (so I hope):
>
> a) yes, that's true: SQLite fully supports VIEWs
> with no odd limitations
>
> b) anyway, SQLite support for Spatial Index (R*Tree)
> is completely different from anything else: on
> SQLite the Spatial Index is a separate table, and
> you are required to explicitly perform a sub-query
> in order to take profit from a Spatial Index when
> it's available (please note: the QGIS own data provider
> silently handles all this in a completely painless way)
>
> c) accordingly to all this, SpatiaLite defines any
> Spatial VIEW on VIEWS_GEOMETRY_COLUMNS (not on
> GEOMETRY_COLUMNS): and this allows to fully support
> Spatial Index for VIEWs as well
>
> bye Sandro
>
More information about the Qgis-developer
mailing list