[Qgis-developer] new GRASS 6.4 modules
Hi all. In the occasion of the release of GRASS 6.4, I think it would be good to revise the current QGIS-GRASS modules. Specifically: - there are modules that IMHO are of no use, and potentially confusing (e.g. several of those who manage projections, etc.) - there are new and useful modules to add to the toolbox - not all modules have been thoroughly tested. I encourage therefore GRASS users to help us defining both a wishlist for modules to be included ad a deprecated list, and to let us know if there are non-functional modules, so they can be fixed. Thanks. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] viewing feature form
Dear QGIS devs, since this is my first post on this list I want to thank all of you for your efforts in providing and improving this wonderful piece of software. My question is as follows: How can I open the feature form for a feature through Python i.e. how can I make the same happen as if the user used the identifyTool and clicked on actions - View feature form? regards Benno -- Dipl.-Geogr. Bernhard Stroebl Anwendungsbetreuer GIS Kommunale Immobilien Jena - Datenverarbeitung - mailto:bernhard.stro...@jena.de http://kij.jena.de/ Information from NOD32 This message was checked by NOD32 Antivirus System for Linux Mail Server. http://www.nod32.com ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Not Rendering the Shapefile in Canvas - Blank
Hi, Is there any reason why the shapefile is not rendering in this code (below)? I tried several shapefiles and yet I am getting a white canvas or blank canvas without a render. I was able to open the shapefile and the form with mapcanvas are showing. Yet no render of the polygons - totally blank. self.canvas.setCanvasColor(Qt.white) a White Canvas without render - BLANK Thanks. Noli class ShapeViewer(QMainWindow, Ui_MainWindow): def __init__(self): QMainWindow.__init__(self) # Required by Qt4 to initialize the UI self.setupUi(self) # Set the title for the app self.setWindowTitle(ShapeViewer) # Create the map canvas self.canvas = QgsMapCanvas() self.canvas.useImageToRender(False) self.canvas.show() # Lay our widgets out in the main window using a # vertical box layout self.layout = QVBoxLayout(self.frame) self.layout.addWidget(self.canvas) # layout is set - open a layer # Add an OGR layer to the map file = QFileDialog.getOpenFileName(self, Open Shapefile, ., Shapefiles (*.shp)) fileInfo = QFileInfo(file) # Add the layer layer = QgsVectorLayer(file, fileInfo.fileName(), ogr) if not layer.isValid(): return # Add layer to the registry QgsMapLayerRegistry.instance().addMapLayer(layer); # Set extent to the extent of our layer self.canvas.setExtent(layer.extent()) # Set up the map canvas layer set cl = QgsMapCanvasLayer(layer) layers = [cl] self.canvas.setLayerSet(layers) ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
AW: [Qgis-developer] Not Rendering the Shapefile in Canvas - Blank
Hi Noli seems you're missing self.canvas.refresh() at the end of your code. regards Cédric mit freundlichen Grüssen Cédric Möri GIS-Informatiker -- Kanton Solothurn Bau- und Justizdepartement Amt für Geoinformation Rötistrasse 4 4501 Solothurn Telefon: +41 (0)32 627 24 75 Telefax: +41 (0)32 627 22 14 mailto:cedric.mo...@bd.so.ch http://www.agi.so.ch - Originalnachricht - Von: Noli Sicad nsi...@gmail.com Gesendet: Fre, 10.9.2010 14:03 An: qgis-developer qgis-developer@lists.osgeo.org Betreff: [Qgis-developer] Not Rendering the Shapefile in Canvas - Blank Hi, Is there any reason why the shapefile is not rendering in this code (below)? I tried several shapefiles and yet I am getting a white canvas or blank canvas without a render. I was able to open the shapefile and the form with mapcanvas are showing. Yet no render of the polygons - totally blank. self.canvas.setCanvasColor(Qt.white) a White Canvas without render - BLANK Thanks. Noli class ShapeViewer(QMainWindow, Ui_MainWindow): def __init__(self): QMainWindow.__init__(self) # Required by Qt4 to initialize the UI self.setupUi(self) # Set the title for the app self.setWindowTitle(ShapeViewer) # Create the map canvas self.canvas = QgsMapCanvas() self.canvas.useImageToRender(False) self.canvas.show() # Lay our widgets out in the main window using a # vertical box layout self.layout = QVBoxLayout(self.frame) self.layout.addWidget(self.canvas) # layout is set - open a layer # Add an OGR layer to the map file = QFileDialog.getOpenFileName(self, Open Shapefile, ., Shapefiles (*.shp)) fileInfo = QFileInfo(file) # Add the layer layer = QgsVectorLayer(file, fileInfo.fileName(), ogr) if not layer.isValid(): return # Add layer to the registry QgsMapLayerRegistry.instance().addMapLayer(layer); # Set extent to the extent of our layer self.canvas.setExtent(layer.extent()) # Set up the map canvas layer set cl = QgsMapCanvasLayer(layer) layers = [cl] self.canvas.setLayerSet(layers) ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Not Rendering the Shapefile in Canvas - Blank
Hi Cédric I inserted self.canvas.refresh() as showed below but still a blank canvas. # Set up the map canvas layer set cl = QgsMapCanvasLayer(layer) layers = [cl] self.canvas.setLayerSet(layers) self.canvas.refresh() ~ Thanks. Noli On 9/10/10, Möri Cedric cedric.mo...@bd.so.ch wrote: Hi Noli seems you're missing self.canvas.refresh() at the end of your code. regards Cédric mit freundlichen Grüssen Cédric Möri GIS-Informatiker -- Kanton Solothurn Bau- und Justizdepartement Amt für Geoinformation Rötistrasse 4 4501 Solothurn Telefon: +41 (0)32 627 24 75 Telefax: +41 (0)32 627 22 14 mailto:cedric.mo...@bd.so.ch http://www.agi.so.ch - Originalnachricht - Von: Noli Sicad nsi...@gmail.com Gesendet: Fre, 10.9.2010 14:03 An: qgis-developer qgis-developer@lists.osgeo.org Betreff: [Qgis-developer] Not Rendering the Shapefile in Canvas - Blank Hi, Is there any reason why the shapefile is not rendering in this code (below)? I tried several shapefiles and yet I am getting a white canvas or blank canvas without a render. I was able to open the shapefile and the form with mapcanvas are showing. Yet no render of the polygons - totally blank. self.canvas.setCanvasColor(Qt.white) a White Canvas without render - BLANK Thanks. Noli class ShapeViewer(QMainWindow, Ui_MainWindow): def __init__(self): QMainWindow.__init__(self) # Required by Qt4 to initialize the UI self.setupUi(self) # Set the title for the app self.setWindowTitle(ShapeViewer) # Create the map canvas self.canvas = QgsMapCanvas() self.canvas.useImageToRender(False) self.canvas.show() # Lay our widgets out in the main window using a # vertical box layout self.layout = QVBoxLayout(self.frame) self.layout.addWidget(self.canvas) # layout is set - open a layer # Add an OGR layer to the map file = QFileDialog.getOpenFileName(self, Open Shapefile, ., Shapefiles (*.shp)) fileInfo = QFileInfo(file) # Add the layer layer = QgsVectorLayer(file, fileInfo.fileName(), ogr) if not layer.isValid(): return # Add layer to the registry QgsMapLayerRegistry.instance().addMapLayer(layer); # Set extent to the extent of our layer self.canvas.setExtent(layer.extent()) # Set up the map canvas layer set cl = QgsMapCanvasLayer(layer) layers = [cl] self.canvas.setLayerSet(layers) ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] PyQGIS - Selecting Spatialite Datasource at runtime
Hi, Given, this example from PyQGIS documentation. uri = QgsDataSourceURI() uri.setDatabase('/home/martin/test-2.3.sqlite') uri.setDataSource('','Towns', 'Geometry') layer = QgsVectorLayer(uri.uri(), 'Towns', 'spatialite') ~ How do you do a runtime for the above. I want to select the table / layer to load. How you figure out the uri.setDataSource('',' ', 'Geometry') and QgsVectorLayer(uri.uri(), ' ', 'Spatialite')? file = QFileDialog.getOpenFileName(self,Open Spatialite, ., Spatialite (*.sqlite)) fileInfo = QFileInfo(file) uri = QgsDataSourceURI() uri.setDatabase(file) uri.setDataSource('',' ', 'Geometry') # Add the layer layer = QgsVectorLayer(uri.uri(), ' ', 'Spatialite') ~ Noli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Re: [GRASS-dev] new GRASS 6.4 modules
On Fri, Sep 10, 2010 at 10:09 AM, Paolo Cavallini cavall...@faunalia.it wrote: Hi all. In the occasion of the release of GRASS 6.4, I think it would be good to revise the current QGIS-GRASS modules. Specifically: - there are modules that IMHO are of no use, and potentially confusing (e.g. several of those who manage projections, etc.) - there are new and useful modules to add to the toolbox - not all modules have been thoroughly tested. I encourage therefore GRASS users to help us defining both a wishlist for modules to be included ad a deprecated list, and to let us know if there are non-functional modules, so they can be fixed. Paolo - agreed, an important issue. Please suggest a wiki page where we can collect responses. Markus ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] PyQGIS - Selecting Spatialite Datasource at runtime
Hi Noli, you could use this [1] (sorry, it's in Spanish). It uses the Sqlite3 Python module [2]. Regards, Germán [1] http://geotux.tuxfamily.org/index.php?option=com_myblogtask=viewid=251Itemid=59 [2] http://docs.python.org/library/sqlite3.html On Fri, Sep 10, 2010 at 9:49 AM, Noli Sicad nsi...@gmail.com wrote: Hi, Given, this example from PyQGIS documentation. uri = QgsDataSourceURI() uri.setDatabase('/home/martin/test-2.3.sqlite') uri.setDataSource('','Towns', 'Geometry') layer = QgsVectorLayer(uri.uri(), 'Towns', 'spatialite') ~ How do you do a runtime for the above. I want to select the table / layer to load. How you figure out the uri.setDataSource('',' ', 'Geometry') and QgsVectorLayer(uri.uri(), ' ', 'Spatialite')? file = QFileDialog.getOpenFileName(self,Open Spatialite, ., Spatialite (*.sqlite)) fileInfo = QFileInfo(file) uri = QgsDataSourceURI() uri.setDatabase(file) uri.setDataSource('',' ', 'Geometry') # Add the layer layer = QgsVectorLayer(uri.uri(), ' ', 'Spatialite') ~ Noli ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- --- |\__ (:__)( |/ Soluciones Geoinformáticas Libres http://geotux.tuxfamily.org/ ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] new GRASS 6.4 modules
Il 10/09/2010 20:02, MORREALE Jean Roc ha scritto: Paolo, if it is not of a too high level, could it be possible to write a wiki page explaining how to wrote and update the grass modules in qgis ? I would like to help on this point but I don't know how. Simple: http://www.qgis.org/wiki/Adding_New_Tools_to_the_GRASS_Toolbox See also: http://www.qgis.org/wiki/Adding_New_Tools_to_the_GRASS_Toolbox#Modules_which_can_be_added and following. (and yes, Markus, this replies to your other suggestion too; see and below). All the best. -- Paolo Cavallini: http://www.faunalia.it/pc ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer