<div dir="ltr">Hi all, <div><br></div><div>could you please let me know of a working command that allows one to load a PostGIS layer into QGIS at startup?</div><div><br></div><div>I've tried with the information provided in the PyQGIS Cookbook [1] with no success. </div><div><br></div><div>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="<br></div><div>But get a "Layer is not valid error."</div><div><br></div><div>I'm using QGIS v.2.6 on GNU/Linux.</div><div><br></div><div>Regards, <br></div><div><br></div><div>Germán </div><div>--</div><div>[1] <a href="http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/loadlayer.html">http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/loadlayer.html</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">2013-12-05 8:19 GMT-05:00 Richard Duivenvoorde <span dir="ltr"><<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 05-12-13 11:33, Uggla Henrik wrote:<br>
> Is there no documentation about this? The extension mentioned is Postgis itself, not a specific Qgis extension, right?<br>
<br>
</span>Off course there is documentation, did you not read it first ;-)<br>
<br>
<a href="http://www.qgis.org/en/docs/pyqgis_developer_cookbook/loadlayer.html#vector-layers" target="_blank">http://www.qgis.org/en/docs/pyqgis_developer_cookbook/loadlayer.html#vector-layers</a><br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">-----------<br>   |\__  <br>(:>__)(<br>   |/    <br><br>Soluciones Geoinformáticas Libres                            <br><a href="http://geotux.tuxfamily.org/">http://geotux.tuxfamily.org/</a><br><a href="http://twitter.com/GeoTux2">http://twitter.com/GeoTux2</a><br></div>
</div></div>