[postgis-users] how to refresh postgis layer in QGIS?

José Pedro Santos zpsantos1 at hotmail.com
Tue Apr 9 00:24:58 PDT 2013


Hi, 

To refresh a layer in the QGIS after making some changes in Postgis is better to remove and import the layer again. If you are using the Postgis Manager you have the option to refresh but that will only refresh the database. 

Regards,
José Santos 

> From: mroswell at gmail.com
> Date: Tue, 9 Apr 2013 00:25:46 -0400
> To: postgis-users at lists.osgeo.org
> Subject: [postgis-users] how to refresh postgis layer in QGIS?
> 
> Does anyone know how to refresh a postGIS layer in QGIS?
> 
> 
> For instance, let's say we alter the table to add a new column in
> PgAdmin III, and want to use that new column in QGIS? For now, i only
> have been able to reload the layer anew.
> 
> here are some failed things I've tried in the python console.
> 
> >>> from PyQt4.QtCore import *
> 
> >>> self.iface.mapCanvas().refresh()
> Traceback (most recent call last):
>   File "<input>", line 1, in <module>
> NameError: name 'self' is not defined
> 
> >>> layers = self.iface.mapCanvas().layers()
> Traceback (most recent call last):
>   File "<input>", line 1, in <module>
> NameError: name 'self' is not defined
> 
> 
> 
> 
> 
> --
> http://FarmBillPrimer.org
> http://www.BaltimoreUrbanAg.org (Please send events; This site is hungry.)
> http://www.ExcellentNutrition.org
> http://www.packtpub.com/drupal-5-views-recipes/book
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130409/dacc898c/attachment.html>


More information about the postgis-users mailing list