[Qgis-developer] Re: [SpatiaLite-Users] Re: spatialite qgis and
python
Alex Mandel
tech_dev at wildintellect.com
Wed May 13 03:15:01 EDT 2009
Luca Mandolesi wrote:
>> QGIS 1.1 can read Spatialite tables directly, and have the same
>> programming interface as other vector layers including Postgis.
>> In fact spatialite compiliation is included in the new version, so if
>> you're only working within QGIS & Python just using the new version
>> should do it for you.
>
>
> I know it, but what I don't find is the name of the python class or method
> that load data from sqlite into qgis.
>
> In this method:
> layer = QgsVectorLayer(uri.uri(), "My Layer label", "postgres")
>
>
> uri.uri() do a query into Postgres as the connection call.
>
> uri = QgsDataSourceURI()
> uri.setConnection("localhost", "5432", "mydb", "myuser", "mypass")
>
> So, I know how make a query into sqlite/spatialite db through sqlalchemy,
> but I don't know how pass data to QgsVectorLayer.
>
Ah, for this question it's probably a good idea to ask on the
qgis-developer <qgis-developer at lists.osgeo.org>, which I've copied on
this email.
Alex
More information about the Qgis-developer
mailing list