[Qgis-user] How load Postgis layer from command line?

Germán Carrillo carrillo.german at gmail.com
Mon Dec 8 15:59:18 PST 2014


Hi all,

could you please let me know of a working command that allows one to load a
PostGIS layer into QGIS at startup?

I've tried with the information provided in the PyQGIS Cookbook [1] with no
success.

Specifically, I tried with the uri.uri() string, something
like: "dbname='buscador' host=localhost port=4326 user='postgres'
password='postgres' table='public'.'parques_nacionales' (geom) sql="
But get a "Layer is not valid error."

I'm using QGIS v.2.6 on GNU/Linux.

Regards,

Germán
--
[1]
http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/loadlayer.html

2013-12-05 8:19 GMT-05:00 Richard Duivenvoorde <rdmailings at duif.net>:

> On 05-12-13 11:33, Uggla Henrik wrote:
> > Is there no documentation about this? The extension mentioned is Postgis
> itself, not a specific Qgis extension, right?
>
> Off course there is documentation, did you not read it first ;-)
>
>
> http://www.qgis.org/en/docs/pyqgis_developer_cookbook/loadlayer.html#vector-layers
>
> Regards,
>
> Richard Duivenvoorde
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



-- 
-----------
   |\__
(:>__)(
   |/

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141208/07823310/attachment.html>


More information about the Qgis-user mailing list