Re: [QGIS-Developer] How to create a simple processing script in QGIS 3.x, eg just a buffer
Hi Anita, I worked it out. Here is a very simple replication of a buffer for scripting, in case anyone else needs it. I don't know if this is best practice but it works for a simple test. I didn't realise I could parse parameters['INPUT'] as an input. Thanks for your help Kind Regards Andrew import processing from qgis.PyQt.QtCore import QCoreApplication from qgis.core import QgsProcessingAlgorithm, QgsProcessing, QgsProcessingParameterFeatureSink,QgsProcessingParameterFeatureSource class testAlg(QgsProcessingAlgorithm): OUTPUT = 'OUTPUT' INPUT = 'INPUT' def tr(self, text): return QCoreApplication.translate('testalg', text) def createInstance(self): return type(self)() def group(self): return self.tr('Test') def groupId(self): return 'test' def __init__(self): super().__init__() def initAlgorithm(self, config=None): self.addParameter( QgsProcessingParameterFeatureSource( self.INPUT, self.tr('Input layer'), [QgsProcessing.TypeVectorAnyGeometry] ) ) self.addParameter( QgsProcessingParameterFeatureSink( self.OUTPUT, self.tr('Output'), QgsProcessing.TypeVectorPolygon ) ) def name(self): return 'testalg' def displayName(self): return self.tr('Test Algorithm') def processAlgorithm(self, parameters, context, feedback): output = processing.run("native:buffer", { 'INPUT': parameters['INPUT'], 'DISTANCE': 10, 'SEGMENTS': 5, 'END_CAP_STYLE': 0, 'JOIN_STYLE': 0, 'MITER_LIMIT': 2, 'DISSOLVE': False, 'OUTPUT': parameters['OUTPUT'] }, context=context, feedback=feedback)['OUTPUT'] return {self.OUTPUT: output} On Thu, Aug 9, 2018 at 5:29 PM Andrew C wrote: > Hi Anita, > > Thanks very much for this. I am still lost though. If I replace the sink > and add your code I don't get an output in the dialog box - it needs to be > a parameter for that to happen right? > > I found this > https://gis.stackexchange.com/questions/282773/writing-a-python-processing-script-with-qgis-3-0 > which lead me to this > https://github.com/qgis/QGIS/blob/master/doc/porting_processing.dox > > Which is recommending "Best practice in 3.x Processing algorithms is to > use "feature sinks" instead of vector layer outputs" > > > Kind Regards > Andrew > > > > On Thu, Aug 9, 2018 at 2:23 PM Anita Graser wrote: > >> Hi Andrew, >> >> On Thu, Aug 9, 2018 at 2:57 PM Andrew C wrote: >> >>> I am not clear on how QgsFeatureSinkis working, perhaps that is why I am >>> not getting the buffered layer? Normally in a script I could try printing >>> variables I cannot see where these are printed either when I tested. >>> >> >> I think you'd need an output layer instead of a feature sink. Have a look >> at >> https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/PostGISExecuteAndLoadSQL.py >> >> self.addOutput(QgsProcessingOutputVectorLayer( >> >> self.OUTPUT, >> >> self.tr("Output layer"), >> >> QgsProcessing.TypeVectorAnyGeometry)) >> >> Regards, >> Anita >> >> ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [QGIS-Developer] How to create a simple processing script in QGIS 3.x, eg just a buffer
Hi Anita, Thanks very much for this. I am still lost though. If I replace the sink and add your code I don't get an output in the dialog box - it needs to be a parameter for that to happen right? I found this https://gis.stackexchange.com/questions/282773/writing-a-python-processing-script-with-qgis-3-0 which lead me to this https://github.com/qgis/QGIS/blob/master/doc/porting_processing.dox Which is recommending "Best practice in 3.x Processing algorithms is to use "feature sinks" instead of vector layer outputs" Kind Regards Andrew On Thu, Aug 9, 2018 at 2:23 PM Anita Graser wrote: > Hi Andrew, > > On Thu, Aug 9, 2018 at 2:57 PM Andrew C wrote: > >> I am not clear on how QgsFeatureSinkis working, perhaps that is why I am >> not getting the buffered layer? Normally in a script I could try printing >> variables I cannot see where these are printed either when I tested. >> > > I think you'd need an output layer instead of a feature sink. Have a look > at > https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/PostGISExecuteAndLoadSQL.py > > self.addOutput(QgsProcessingOutputVectorLayer( > > self.OUTPUT, > > self.tr("Output layer"), > > QgsProcessing.TypeVectorAnyGeometry)) > > Regards, > Anita > > ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[QGIS-Developer] How to create a simple processing script in QGIS 3.x, eg just a buffer
Hi All, Can someone offer me some guidance on the new scripting process in QGIS 3x? If I take the create script from template option and make some very minor changes (below), why am I not writing a buffer? The script will execute with no errors, is this line buffered_layer = processing.run("native:buffer",.. even being run? The lines I have changed from the template are show with ### I am not clear on how QgsFeatureSinkis working, perhaps that is why I am not getting the buffered layer? Normally in a script I could try printing variables I cannot see where these are printed either when I tested. Ultimately I'd like to expand the script, but first I am hoping to just be able to call a simple buffer. Thanks in advance for any help Kind Regards Andrew """ *** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * *** """ from PyQt5.QtCore import QCoreApplication from qgis.core import (QgsProcessing, QgsFeatureSink, QgsProcessingException, QgsProcessingAlgorithm, QgsProcessingParameterFeatureSource, QgsProcessingParameterFeatureSink) import processing class ExampleProcessingAlgorithm(QgsProcessingAlgorithm): """ This is an example algorithm that takes a vector layer and creates a new identical one. It is meant to be used as an example of how to create your own algorithms and explain methods and variables used to do it. An algorithm like this will be available in all elements, and there is not need for additional work. All Processing algorithms should extend the QgsProcessingAlgorithm class. """ # Constants used to refer to parameters and outputs. They will be # used when calling the algorithm from another algorithm, or when # calling from the QGIS console. INPUT = 'INPUT' OUTPUT = 'OUTPUT' def tr(self, string): """ Returns a translatable string with the self.tr() function. """ return QCoreApplication.translate('Processing', string) def createInstance(self): return ExampleProcessingAlgorithm() def name(self): """ Returns the algorithm name, used for identifying the algorithm. This string should be fixed for the algorithm, and must not be localised. The name should be unique within each provider. Names should contain lowercase alphanumeric characters only and no spaces or other formatting characters. """ return 'myscript' def displayName(self): """ Returns the translated algorithm name, which should be used for any user-visible display of the algorithm name. """ return self.tr('My Script') def group(self): """ Returns the name of the group this algorithm belongs to. This string should be localised. """ return self.tr('Example scripts') def groupId(self): """ Returns the unique ID of the group this algorithm belongs to. This string should be fixed for the algorithm, and must not be localised. The group id should be unique within each provider. Group id should contain lowercase alphanumeric characters only and no spaces or other formatting characters. """ return 'examplescripts' def shortHelpString(self): """ Returns a localised short helper string for the algorithm. This string should provide a basic description about what the algorithm does and the parameters and outputs associated with it.. """ return self.tr("Example algorithm short description") def initAlgorithm(self, config=None): """ Here we define the inputs and output of the algorithm, along with some other properties. """ # We add the input vector features source. It can have any kind of # geometry. self.addParameter( QgsProcessingParameterFeatureSource( self.INPUT, self.tr('Input layer'),
[QGIS-Developer] Compiling Qwt for qgis3/qt5
Hi The docs state Qwt >= 5.0 & (< 6.1 with internal QwtPolar) Can you be more explicit about exactly which version of Qwt (and QwtPolar) to use? Most versions of Qwt don't build with Qt-5. QwtPolar doesn't seem to build at all. Any advice regarding building Qwt? Thanks! ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Building for Windows 10
Following the instructions here: https://htmlpreview.github.io/?https://github.com/qgis/QGIS/blob/master/doc/INSTALL.html I'm getting the following trying to configure 2.18: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PYTHON_LIBRARY linked by target "qgispython" in directory C:/CodingX/QGIS/src/python linked by target "python_module_qgis__networkanalysis" in directory C:/CodingX/QGIS/python linked by target "python_module_qgis__core" in directory C:/CodingX/QGIS/python linked by target "python_module_qgis__analysis" in directory C:/CodingX/QGIS/python linked by target "python_module_qgis__gui" in directory C:/CodingX/QGIS/python QWTPOLAR_INCLUDE_DIR used as include directory in directory C:/CodingX/QGIS/src/app used as include directory in directory C:/CodingX/QGIS/src/app QWTPOLAR_LIBRARY linked by target "qgis_app" in directory C:/CodingX/QGIS/src/app linked by target "qgis_maptoolselect" in directory C:/CodingX/QGIS/tests/src/app linked by target "qgis_apppythontest" in directory C:/CodingX/QGIS/tests/src/app linked by target "qgis_vectorlayersaveasdialogtest" in directory C:/CodingX/QGIS/tests/src/app linked by target "qgis_fieldcalculatortest" in directory C:/CodingX/QGIS/tests/src/app linked by target "qgis_maptoolidentifyaction" in directory C:/CodingX/QGIS/tests/src/app linked by target "qgis_attributetabletest" in directory C:/CodingX/QGIS/tests/src/app linked by target "qgis_measuretool" in directory C:/CodingX/QGIS/tests/src/app linked by target "qgis_qgisappclipboard" in directory C:/CodingX/QGIS/tests/src/app SPATIALINDEX_LIBRARY linked by target "qgis_core" in directory C:/CodingX/QGIS/src/core On 04/02/2017 00:06, Matthias Kuhn wrote: Hi Andrew, Compiling with Qt 5 (and therefore compiling master) on Windows is still very experimental. The libraries are not yet available on osgeo4w and I'm not sure if they are available elsewhere (QCA, QWT, QtWebKit, PyQt5-Python3 etc.). Depending on what you need, compile the release-2_18 branch with the dependencies on osgeo4w, wait a little longer until the dependencies become available (or use linux or mac or if you really want you can also try to compile all the dependencies yourself as well). Matthias On 03/02/2017 18:18, Andrew Gillett wrote: Any particular version of QT? It turns out it can't be higher than QT 5.5 because QTWebKit was removed in later versions. But QTScript is not present in 5.5. Now I'm trying 5.3 but I get: CMake Error at cmake/FindQCA.cmake:59 (message): Could not find QCA Call Stack (most recent call first): CMakeLists.txt:292 (FIND_PACKAGE) Went back to OSGeo4W setup, installed QCA-libs and QCA-devel - no difference. On 03/02/2017 14:16, Luigi Pirelli wrote: for master (eg. QGIS3.x) is a prerequisite Luigi Pirelli ** * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com * LinkedIn:https://www.linkedin.com/in/luigipirelli * Stackexchange:http://gis.stackexchange.com/users/19667/luigi-pirelli * GitHub:https://github.com/luipir * Mastering QGIS 2nd Edition: *https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition ** On 3 February 2017 at 14:12, Andrew Gillett<argan...@pair.com> wrote: I get the following error during the configure stage in CMake: CMake Error at CMakeLists.txt:248 (FIND_PACKAGE): By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Gui", but CMake did not find one. Could not find a package configuration file provided by "Qt5Gui" with any of the following names: Qt5GuiConfig.cmake qt5gui-config.cmake Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set "Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui" provides a separate development package or SDK, be sure it has been installed. QT5 is not mentioned in the docs as a prerequisite, am I meant to get it fromwww.qt.io (installer wants me to create an account) or is it meant to come from somewhere else? ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info:ht
Re: [Qgis-developer] Building for Windows 10
Any particular version of QT? It turns out it can't be higher than QT 5.5 because QTWebKit was removed in later versions. But QTScript is not present in 5.5. Now I'm trying 5.3 but I get: CMake Error at cmake/FindQCA.cmake:59 (message): Could not find QCA Call Stack (most recent call first): CMakeLists.txt:292 (FIND_PACKAGE) Went back to OSGeo4W setup, installed QCA-libs and QCA-devel - no difference. On 03/02/2017 14:16, Luigi Pirelli wrote: for master (eg. QGIS3.x) is a prerequisite Luigi Pirelli ** * Boundless QGIS Support/Development: lpirelli AT boundlessgeo DOT com * LinkedIn: https://www.linkedin.com/in/luigipirelli * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli * GitHub: https://github.com/luipir * Mastering QGIS 2nd Edition: * https://www.packtpub.com/big-data-and-business-intelligence/mastering-qgis-second-edition ** On 3 February 2017 at 14:12, Andrew Gillett <argan...@pair.com> wrote: I get the following error during the configure stage in CMake: CMake Error at CMakeLists.txt:248 (FIND_PACKAGE): By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Gui", but CMake did not find one. Could not find a package configuration file provided by "Qt5Gui" with any of the following names: Qt5GuiConfig.cmake qt5gui-config.cmake Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set "Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui" provides a separate development package or SDK, be sure it has been installed. QT5 is not mentioned in the docs as a prerequisite, am I meant to get it from www.qt.io (installer wants me to create an account) or is it meant to come from somewhere else? ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Building for Windows 10
I get the following error during the configure stage in CMake: CMake Error at CMakeLists.txt:248 (FIND_PACKAGE): By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Gui", but CMake did not find one. Could not find a package configuration file provided by "Qt5Gui" with any of the following names: Qt5GuiConfig.cmake qt5gui-config.cmake Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set "Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui" provides a separate development package or SDK, be sure it has been installed. QT5 is not mentioned in the docs as a prerequisite, am I meant to get it from www.qt.io (installer wants me to create an account) or is it meant to come from somewhere else? ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] python form validation help
I am trying to write some form validation to work around bug #15050 <http://hub.qgis.org/issues/15050>. Based on some examples I have found I think this should work: from PyQt4.QtCore import * from PyQt4.QtGui import * myDialog = None notesField = None def formOpen(dialog,layerid,featureid): global myDialog global notesField myDialog = dialog notesField = dialog.findChild(QPlainTextEdit,"Notes") buttonBox = dialog.findChild(QDialogButtonBox,"buttonBox") # Disconnect the signal that QGIS has wired up for the dialog to the button box. buttonBox.accepted.disconnect(myDialog.accept) # Wire up our own signals. buttonBox.accepted.connect(validate) #buttonBox.rejected.connect(myDialog.reject) def validate(): if notesField.document().characterCount() > 1000: msgBox = QMessageBox() msgBox.setText("Notes field must be <1000 characters") msgBox.exec_() else: myDialog.accept() What happens is that I get the message box with the error, but when I click OK on the message box the form closes and saves anyway and I still lose text in the multiline field if it exceeds the field length. How do I keep the form open to allow the user to fix the error(s)? Thanks, Andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Feedback for contrast enhancement ... enhancements ?
One note I would add is that the 2-click option does not work with a singleband pseudocolor renderer(neither does the raster toolbar which offers a 1-click stretch). So I think updating the right-click>"Stretch using current extent" to work with singleband pseudocolor would be excellent to include. Also, I agree that min/max would be good as a default, for singleband at least. Beyond that I like the sound of solution and I would love to see this functionality in QGIS. a On Fri, Sep 2, 2016 at 3:38 AM, Even Rouaultwrote: > Hi, > > There has been interest expressed to improve the usability of the contrast > enhancement function. Basically there are workflows where you want the > min/max > values used by contrast enhancement to be updated each time you pan or zoom > the canvas. From what I've seen, here's what currently exists: > - a long method (6 clicks): through the Style tab of the layer properties > - a faster method (2 clicks): through the "Strech using current extent" of > the > contextual menu of the layer panel. > > When you have several rasters loaded, even the 2-click method is > inconvenient, > so there's a need for a 0-click solution (once the layers have been > configured) > > Another shortcoming in the current implementation is that the settings of > the > "Load min/max values" foldable group are not persistant, which requires re- > setting them if you're not happy with the default Cumlative count cut > method. > And if you use the "Strech using current extent" menu item, the genuine > min/max values are used (not the 2-98% cumulative count cut) > > So I was thinking to something along the following lines: > - make the min/max settings persistant > - remove the "Load" button and "Clip extent to canvas" checkbox, and > replace > them by 3 radio buttons to determine the scope of statistics : "Whole > raster", > "Current canvas" and "Updated canvas". See the attached > proposal_min_max.png. > The function of the Load button would be replaced by the general Apply / OK > buttons. > - when the user manually enters the min/max values, the 2 groups of radio > buttons (method to compute min/max and scope of statistics) would be > unchecked > so that is is clear that they don't come from computed statistics. I also > think that when you select "Current canvas", once the Apply/OK buttons have > been pushed, the checked state of Current canvas shouldn't be saved. This > way > when you display the layer properties you have a good idea of where the > current min/max values come from. > - make the "Strech using current extent" method honour the way min/max are > computed in the min/max settings instead of using systematically the > min/max. > So when "Updated canvas" would be selected, it would have no (extra) > effect as > expected. > > Any opinions ? > > Even > > -- > Spatialys - Geospatial professional services > http://www.spatialys.com > > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] GRASS missing from Processing?
Hi Bernd, Did editing(processing version 2.10.1) grass7algortihm.py work for you? I noticed yesterday that with processing 2.10.2 GRASS7 doesnt work but reverting to the edited version of 2.10.1 fixed that. Andrew On Sat, Oct 3, 2015 at 8:17 AM, Bernd Vogelgesang <bernd.vogelges...@gmx.de> wrote: > Hi folks, > though there was an update of Processing to 2.10.2, my GRASS7 still won't > work in QGIS 2.8.3 (LTR and ubuntu-unstable dependencies repositories) > Returning to Processing 2.9.3 (which now permanently resides as a zip in > my plugins folder, so I only have to uncompress it and have GRASS running > again after an update) > > Anyone experiencing the same? > > Cheers > Bernd > > > Am 18.09.2015, 12:31 Uhr, schrieb Paolo Cavallini <cavall...@faunalia.it>: > > Il 18/09/2015 11:58, Bernd Vogelgesang ha scritto: >> >> Strange. Processing is my work horse from the moment on it was >>> published, and I will never want to miss it again. I wonder how and what >>> other users do, when not using processing? This is an outstanding >>> innovation >>> >> >> Agreed. The main point here is very few people invest in it, so >> stabilization and innovation is slower than we would like. >> All the best. >> > > > -- > Bernd Vogelgesang > Siedlerstraße 2 > 91083 Baiersdorf/Igelsdorf > Tel: 09133-825374 > ___ > 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] [Qgis-user] Any working GRASS in QGIS available? - Processing Bug?
Sure thing. Open the .qgis2/python/plugins/processing/algs/grass7/ folder and open the Grass7Algorithm.py file in a text editor. You can see the changes that you'll need to make on GitHub: https://github.com/qgis/QGIS/commit/2a14ffd281d0a0e99a0a899622a29ca0efdb0852 It is just a couple small changes. I suppose alternately you could just download the Grass7Algorithm.py file from GitHub and replace the one in the above mentioned folder. Andrew On Tue, Aug 11, 2015 at 12:29 PM, Bernd Vogelgesang bernd.vogelges...@gmx.de wrote: Hi Andrew Am 06.08.2015, 19:20 Uhr, schrieb Andrew amcani...@gmail.com: Victor, I edited the version of the processing plugin that i have installed (QGIS 2.8.3, processing 2.10.1) with the changes you made and now GRASS7 tools work as they should, thanks! Andrew Could you maybe describe a little bit what you have changed and how ? Bernd On Thu, Aug 6, 2015 at 5:59 AM, Victor Olaya vola...@gmail.com wrote: A quick (but very relevant) note about GRASS7: It seems that, in one of the latest changes, I unintentionally left out a code line where GRASS was actually being called. I was getting a bit crazy wondering where the error might be and why GRASS7 was not working in the latest releaseand finally found out that the reason was that. So, in short, Processing was not running grass when running a grass7 algorithm. I have added that line back and it should be fine now. If you can install the current master version, please test and let me know if there are any issues or it is working correctly as before. Regards 2015-08-03 1:37 GMT+02:00 Bernd Vogelgesang bernd.vogelges...@gmx.de: Hi Alex Am 03.08.2015, 01:20 Uhr, schrieb Alex Mandel tech_...@wildintellect.com: Ah but we're closer to finding a solution with all those details. It may be fixable in Processing, which can be pushed to the plugin repo for update any time. Passing this along to devs who might have enough information now. Thanks, Alex Thanks for taking care, by the way: by copying the gdal algorithms from processing 2.10.1 to the 2.9.3 folder (.qgis2/python/plugins/processing/algs/gdal), I gained access to the new GDAL dissolve polygons :) Unfortunately, the model from before (GRASS6) didn't work anymore, and all attempts to adjust it via diff of a test model failed. So reworking my model (for the 10th time or so) in Ubuntu 2.8.3 from ubuntugis-ltr with working GRASS7, SAGA and everything and a partially upgraded Processing 2.9.3 I'm on my way ... finally .. hopefully ... Bernd On 08/02/2015 03:07 PM, Bernd Vogelgesang wrote: Am 02.08.2015, 22:44 Uhr, schrieb Alex Mandel tech_...@wildintellect.com: After some brief testing, my OSGeoLive 8.5 VM with QGIS 2.6 and Processing 2.9.3, GRASS 7 works. My QGIS 2.8, GRASS 6/7, Processing 2.10.1 does not. Gave Windows another try: Removed everything, and installed the simple install OSGEO4W setup. QGIS 2.10.1 with Processing 2.10.1 and GRASS 6 working. switched back to Ubuntu, cause of a bug in the modeler version of GDAL Dissolve Polygons (which is crucial for me). https://hub.qgis.org/issues/13174 Ubuntu: Now that I installed 2.8 with the debian repository only (so without ubuntis depencies), my GRASS 6 works (sorted out another error, that GRASS takes a column name OR from shape as an sql-command or sth), update to Processing 2.10.1 worked as well. The drawback, no SAGA, which might come handy cause the now available algos do not really do what I expect ;) I think the problem is within Processing in combination with the packaging: When e.g. I install QGIS 2.8 with ubuntugis-ltr dependencies (where nobody on the install page claims I shouldn't do), GRASS7 and the modeler are working, but Processing version is 2.6. Updating Processing to current Processing 2.10.1 (as recommended) seems to work. (Besides that v.clean in the modeler only returns a polygon layer from an polygon input, if I also set an output name for the error layer, otherwise I get an empty line shape) But: The next time I run QGIS and want to run an GRASS algo: Missing depencies I can now replace Processing 2.10.1 with the second latest 2.9.3 from https://plugins.qgis.org/plugins/processing/version/2.9.3/ and there v.clean does what it should in Processing AND modeler. But: Now I do not have GDAL Dissolve polygons which is in Processing 2.10.1. Well, I could switch back to Windows QGIS 2.10, but, grr, there is the bug in this algo ... You see, I'm trapped. Thanx for you attention Bernd Both are Ubuntu 14.04 based. I'm not sure if this is a bug in Processing, or in packaging. I recall in OSGeoLive 8.5 that we had custom packages with a patch. Note, you can get those versions for your Ubuntu system from https://launchpad.net/~osgeolive/+archive/ubuntu/release-8.5 We freeze
Re: [Qgis-developer] [Qgis-user] Any working GRASS in QGIS available? - Processing Bug?
Victor, I edited the version of the processing plugin that i have installed (QGIS 2.8.3, processing 2.10.1) with the changes you made and now GRASS7 tools work as they should, thanks! Andrew On Thu, Aug 6, 2015 at 5:59 AM, Victor Olaya vola...@gmail.com wrote: A quick (but very relevant) note about GRASS7: It seems that, in one of the latest changes, I unintentionally left out a code line where GRASS was actually being called. I was getting a bit crazy wondering where the error might be and why GRASS7 was not working in the latest releaseand finally found out that the reason was that. So, in short, Processing was not running grass when running a grass7 algorithm. I have added that line back and it should be fine now. If you can install the current master version, please test and let me know if there are any issues or it is working correctly as before. Regards 2015-08-03 1:37 GMT+02:00 Bernd Vogelgesang bernd.vogelges...@gmx.de: Hi Alex Am 03.08.2015, 01:20 Uhr, schrieb Alex Mandel tech_...@wildintellect.com: Ah but we're closer to finding a solution with all those details. It may be fixable in Processing, which can be pushed to the plugin repo for update any time. Passing this along to devs who might have enough information now. Thanks, Alex Thanks for taking care, by the way: by copying the gdal algorithms from processing 2.10.1 to the 2.9.3 folder (.qgis2/python/plugins/processing/algs/gdal), I gained access to the new GDAL dissolve polygons :) Unfortunately, the model from before (GRASS6) didn't work anymore, and all attempts to adjust it via diff of a test model failed. So reworking my model (for the 10th time or so) in Ubuntu 2.8.3 from ubuntugis-ltr with working GRASS7, SAGA and everything and a partially upgraded Processing 2.9.3 I'm on my way ... finally .. hopefully ... Bernd On 08/02/2015 03:07 PM, Bernd Vogelgesang wrote: Am 02.08.2015, 22:44 Uhr, schrieb Alex Mandel tech_...@wildintellect.com: After some brief testing, my OSGeoLive 8.5 VM with QGIS 2.6 and Processing 2.9.3, GRASS 7 works. My QGIS 2.8, GRASS 6/7, Processing 2.10.1 does not. Gave Windows another try: Removed everything, and installed the simple install OSGEO4W setup. QGIS 2.10.1 with Processing 2.10.1 and GRASS 6 working. switched back to Ubuntu, cause of a bug in the modeler version of GDAL Dissolve Polygons (which is crucial for me). https://hub.qgis.org/issues/13174 Ubuntu: Now that I installed 2.8 with the debian repository only (so without ubuntis depencies), my GRASS 6 works (sorted out another error, that GRASS takes a column name OR from shape as an sql-command or sth), update to Processing 2.10.1 worked as well. The drawback, no SAGA, which might come handy cause the now available algos do not really do what I expect ;) I think the problem is within Processing in combination with the packaging: When e.g. I install QGIS 2.8 with ubuntugis-ltr dependencies (where nobody on the install page claims I shouldn't do), GRASS7 and the modeler are working, but Processing version is 2.6. Updating Processing to current Processing 2.10.1 (as recommended) seems to work. (Besides that v.clean in the modeler only returns a polygon layer from an polygon input, if I also set an output name for the error layer, otherwise I get an empty line shape) But: The next time I run QGIS and want to run an GRASS algo: Missing depencies I can now replace Processing 2.10.1 with the second latest 2.9.3 from https://plugins.qgis.org/plugins/processing/version/2.9.3/ and there v.clean does what it should in Processing AND modeler. But: Now I do not have GDAL Dissolve polygons which is in Processing 2.10.1. Well, I could switch back to Windows QGIS 2.10, but, grr, there is the bug in this algo ... You see, I'm trapped. Thanx for you attention Bernd Both are Ubuntu 14.04 based. I'm not sure if this is a bug in Processing, or in packaging. I recall in OSGeoLive 8.5 that we had custom packages with a patch. Note, you can get those versions for your Ubuntu system from https://launchpad.net/~osgeolive/+archive/ubuntu/release-8.5 We freeze a copy of the working versions in our own ppa for long term history. Thanks, Alex On 2015-08-02 03:32, Bernd Vogelgesang wrote: Hi Alex, Am 02.08.2015, 01:22 Uhr, schrieb Alex Mandel tech_...@wildintellect.com: It's not a Windows/Ubuntu/Mac/OS thing, it's a QGIS + GRASS version change thing. Please indicate which version of QGIS and GRASS you are trying to get working. Actually I do not mind any more what version I would like to get working. I would have preferred the 2.8-LTR branch with no-matter-what GRASS version. I just would like to be able to finish my project, and there is unfortunately no alternative to the GRASS algos in my model. QGIS 2.6
[Qgis-developer] Telemetry Layer (new release made)
Have just uploaded a new version of our experimental Telemetry Layer (MQTT - QGIS integration) plugin. Am reasonably happy with this release. There are things missing, and no doubt some defects, but what is there seems quite stable and provides a nice framework for extension. An example sample plugin that uses the Telemetry Layer classes is provided showing how to sub class a topic manager and feature dock to provide customised styling and behaviour on a per layer/per feature basis. Each feature is a topic and additional variables (i.e. like tank height settings for a water tank) can be set via V2Widgets ( hmm. side note - is there a plan to upgrade the default feature dialog to support better names and tool tips for each widget?) Payloads by default are formatted by custom $qgsfuncs but options to access/modify/render the underlying payload data before being committed to its feature or via the floating dock interface is possible. Feature dock parent classes exist for basic text; a simple toggle switch showing the use of an 'mqtt publish', and an SVG widget using QSvgWidget (that does currently does nothing but looks really cool). Possible use cases for the future: - Move features using GPS coords as payloads - Show images from fixed web cams or update a raster layer - Standard HMI functions to control/view sensors and actuators - UAV integration If you can see the potential and are excited by this, a helping hand or some crowd funding is always welcome. High on my list are: - creating the logic for a range of SVG controls (dials, switches, sliders, meters etc.) - performing the transforms from GPS coords to dx/dy and adding the logic for moving features based on this - migrating the Rule Based layer formatter from static .qml file to programmatic creation - more cross platform testing Github here: https://github.com/nzfarmer1/telemetrylayer Thanks for your time. Andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Debugging a QGIS crash
Tom I'd suggest installing VM Ware and running QGIS under Ubuntu. You will have access to a console and better debugging facilities. You could even run the program under strace. Ideally you want to see a stack trace so you can identify the pyqt commands that were executed prior to crashing. Of course it could be operating system specific. For windows, a quick google revealed this: http://stackoverflow.com/questions/112831/how-to-get-a-stack-trace-when-c-program-crashes-using-msvc8-2005 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Rendering active map symbol as QPixmap
Awesome, Thanks Nathan! On 8/05/2015, at 10:34 am, Nathan Woodrow madman...@gmail.com wrote: Hey Andrew, This is how I did it with Roam to get all the legend items for the layer: items = layer.rendererV2().legendSymbologyItems(ICON_SIZE) That will give you a list of:Text - Icon pairs if you are using the rule base renderer you get can the symbol for the rule and paint that into a pixmap, however note that one feature can have many symbols so you will have to use the method that returns a list for all the symbols. Depending on what you are doing legendSymbologyItems might give you what you need without extra work. - Nathan On Fri, 8 May 2015 at 07:00 Andrew McClure and...@southweb.co.nz wrote: Any takers for this one? I'd like to render the active symbol for a layer as a QPixmap in a dialog. I have got this far: s = layer().rendererV2() key = s.rootRule().findRuleByKey(s.rootRule().ruleKey()) This tells me the active rule key to be rendered but how to get the image data? Perhaps I am barking up the wrong tree here? Thanks ___ 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] Rendering active map symbol programmatically
Am struggling a bit with this problem. I want to render the active symbol for a layer as a QPixmap in a dialog. I have got this far: s = layer().rendererV2() key = s.rootRule().findRuleByKey(s.rootRule().ruleKey()) This tells me the active rule key to be rendered but how to get the image data? Perhaps I am barking up the wrong tree here? Thanks ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Have custom functions available in the console
Caroline Have you tried prepending the dollar symbol $? $a() On 28/03/2015, at 3:18 am, Caroline Alexiou carolin...@gmail.com wrote: Hello, I want to have some helper functions available in the Python console within qgis, for instance this: def a(): return iface.activeLayer() so that I type less things. I tried to start qgis with the --code argument but this didn't work. I also tried to put this function in the .qgis2/python/startup.py but when I am in the console a() is not recognized. I can create @qgsfunction(0, Python) def a(v,f,p): return iface.activeLayer() in startup.py but then I'm not sure how I'd use it from within the console. Also, I know I can use scriptrunner to get the function to work, but I am looking to do this on startup, ie I start qgis, go to the console and a() is available. Is this possible within Qgis core or should I look into maybe adapting script runner for my purposes? ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] graph and plots improvements?
I would love to be able to have a linked ipython qtconsole or notebook for just this sort of use. I have long regretted that the ipython plugin isnt maintained any more. I have taken a few stabs at trying to update it but it was beyond my minimal skills. Andrew On Wed, Mar 18, 2015 at 10:44 AM, Matthias Kuhn matth...@opengis.ch wrote: On 03/18/2015 06:07 PM, Matteo Ghetta wrote: Thanks Regis and Matthias for your reply. Shouln't we write a small work flow somewhere or, I don't now what it's better, in order to start working on that? I mean, if there are a few people interested on this topic it'd be great to have an idea on how to organize the work.. :) Maybe someone could dig into this plugin again: https://github.com/Sharpie/qgis-ipython It would be awesome to be able to use pandas with matplotlib from in there. ___ 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] wrapping changeAttributeValue between begin and end EditCommand
+1 for this I was unaware of the reason for the crashes on Undo I was seeing until this thread. Our approach in Telemetry Layer was to simply end the edit session and commit the changes programmatically denying the possibility of a user undo. A more elegant approach would be welcomed. On 17/03/2015, at 9:47 am, Matthias Kuhn matth...@opengis.ch wrote: On 03/16/2015 09:32 PM, Luigi Pirelli wrote: I used a different approach attaching to end Editing action to do a similar work. The logic is, start editing, do modification, stop editing is intercepted to save EditingBuffer and then roolback all modification. Then process editing buffer to create values basing on a rule and them I can add/change the modified records with a new editing session without user interaction. It would be so nice to be able to be able to register a trigger that is executed to do this kind of things and data validation directly before it enters the edit buffer. ___ 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] Simple sample code for function editor
You may want to include reference to the unregister method when cleaning up. // For all your user defined functions if QgsExpression.isFunctionName($name): QgsExpression.unregisterFunction($name) ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS and GRASS 7.0.0
Hi Radim, I would be willing to volunteer to help maintain the qgm and qgc files. Andrew On Tue, Feb 24, 2015 at 12:28 AM, Radim Blazek radim.bla...@gmail.com wrote: Olá todos, I'am already preparing crowdfunding campaign for GRASS plugin upgrade. It will include: - qgisgrasslib upgrade to GRASS 7 - single build with both GRASS 6 and 7 (GRASS version chosen by environmental variables on start up) - move plugin browser functionality to standard QGIS browser (meta info widget, delete and rename action) - implement raster and vector import via browser drag and drop (including reprojection) - new/open/close location tools upgrade to GRASS 7 - region editor upgrade to GRASS 7 - upgrade GRASS shell to the last qtermwidget - modules GUI - my idea is to throw away the qgm and qgc definitions and auto generate GUI for modules with all options based on --interface-description only, also the list of modules would be auto generated for all modules. The reason is my impression that there are no volunteers willing to maintain qgm and qgc. If there are volunteers to do that (no programming, xml editing only) let me know and I'll include keeping of current system in the proposal. - vector editing overall upgrade and enhancement more integrated with standard QGIS tools - standard editing tools (e.g. node tool) - snapping to other layers - undo/redo - attribute forms - possibility to change topological symbology via standard style dialog - standard rendering of not edited layers based on edited map (i.e. draw filled polygons on background during editing) I am currently coding proof of concept for vector editing to be sure that it is feasible at all. I hope to launch the campaign in about 2-3 weeks. Radim On Mon, Feb 23, 2015 at 10:06 PM, Pedro Venâncio pedrongvenan...@gmail.com wrote: Olá Paolo, this will require a reasonable amount of work. I have raised the issue several times; sadly it seems nobody is willing to invest the necessary resources on this. Despite the great advantages of GRASS commands in Processing, I think that the GRASS plugin still plays an important role and is an excellent interface for GRASS. For those who still like to use the paradigm of locations, mapsets and the GRASS topological model, GRASS plugin is very important, because then it allows to use all QGIS tools, for example, to create layouts using the Composer, etc. If no one is interested in making the port of the plugin for GRASS 7, we could try through a crowdfounding initiative. Who was behind the initial creation of GRASS plugin? BTW, would you mind giving us a list of the missing modules in Processing? AFAIK these should be only obsolete and useless ones, but if there is some genuinely missing we should be able to fix this rather easily. I've been checking the differences and they are indeed few. Please see the spreadsheet attached. Some commands seem that were adaptations of other algorithms, made for Processing, as they are not in the 6 manual, or in the 7: r.cost.full.raster, r.drain.coordinate, r.terraflow.short, v.surf.rst.cvdev.line, v.surf.rst.line, v.transform.pointsfile. Others seem that have been removed from GRASS 7 (r.average, r.bilinear, r.bitpattern, r.surf.idw2), as they are not in the GRASS 7 manual. There are five that seem important to me, which are in GRASS 7, in Processing GRASS 6, but not in Processing GRASS 7: r.out.xyz, r.ros, r.spread, r.univar, v.kernel. Finally, there are two commands that are on GRASS 7 and were not in 6: r.viewshed (which replace r.los) and r.relief (which replace r.shaded.relief). Thanks! Best regards, Pedro Venâncio ___ 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
Re: [Qgis-developer] QgsAttributeDialog() working example
Alexandre I wanted to give an update on this. Use case 1: - Store a reference to the feature in the data portion of a QWidget - On a callback, make the layer editable and pass the stored feature to the openFeatureForm This works and enabled the feature to be edited. HOWEVER, the feature may already have been changed so could be in a stale state. Use case 2: - On the same call back, look up the new feature using layer.getFeatures() - Make the layer editable and pass the returned feature to the openFeatureForm This fails. Feature form opens as non editable. Use case 3: - Use the original feature. - Copy the attributes from layer.getFeatures() to ensure the old feature is in sync. - Make the layer editable and pass the updated feature to the openFeatureForm This appears to work ok. See issue raised here: https://hub.qgis.org/issues/11395 Telemetry Layer has been updated to support the working scenario: http://plugins.qgis.org/plugins/TelemetryLayer/ Andrew Hello, even calling startEditing() programmatically, I don't seem to be able to open the Form in editable mode. Any help with this will be appreciated Thanks, Alexandre Neto On Thu, Oct 2, 2014 at 6:33 AM, Andrew McClure and...@southweb.co.nz wrote: I found this thread very helpful. It seems to be that to the dialog into edit mode this has to be done programmatically by calling startEditing() - not by simply having the layer in edit mode. Can anyone else verify that? Regardless, thanks for the pointers and suggestions in the thread. Much appreciated. On 30/09/2014, at 8:12 pm, Alexandre Neto senhor.n...@gmail.com wrote: Hi On Tue, Sep 30, 2014 at 6:42 AM, Denis Rouzaud denis.rouz...@gmail.com wrote: If you want to open a feature form like doing it from QGIS, just run: iface.openFeatureForm(layer, feature, false, true/false) http://qgis.org/api/classQgisInterface.html#a11b90f38afd09ac5e9f363933ee4a509 Cheers, Denis Actually this how my plugin worked back in QGIS 2.2. But in the latest versions the iface.openFeatureForm() is always in add mode (like setIsAddDialog). That is, after accepting the dialog, it adds a new feature, and does not update my temporary feature. This leaves no room for any changes before the feature commit. I described my problem in the following bug report, and Matthias Kuhn adviced me to create my own Dialog, so that's what I'm trying to do. I would be glad to use iface.openFeatureForm() only https://hub.qgis.org/issues/11099 Thanks for your help Alexandre On 29.09.2014 18:19, Alexandre Neto wrote: Hello Salvatore, You were right, I just needed to import the class first, this have opened the form for me: from qgis.gui import QgsAttributeDialog mc = iface.mapCanvas() layer = mc.currentLayer() temp_feature.setAttributes(attributes) dialog = QgsAttributeDialog(layer, temp_feature, True) dialog.show() But now I can't make it editable. All I can do is cancel the dialog. Thanks for your help, Alexandre Neto On Mon, Sep 29, 2014 at 4:21 PM, Salvatore Larosa lrssv...@gmail.com wrote: Hi, On Mon, Sep 29, 2014 at 4:56 PM, Alexandre Neto senhor.n...@gmail.com wrote: Hello, I'm trying to open an attribute dialog for a temporary feature using QgsAttributeDialog(). but with no luck. Can anyone point me to working example? I'm trying something like this: mc = iface.mapCanvas() layer = mc.currentLayer() dialog = QgsAttributeDialog(layer, temp_feature) dialog.show() I think you should to import the class before and setting the feature owner bool parameter. after this changes the snippet should work fine for you! Regards, -SL -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode ___ 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 mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QgsAttributeDialog() working example
Alexandre Feel free to see a working example in the latest release of TelemetryLayer https://github.com/nzfarmer1/telemetrylayer/blob/master/tlbrokerconfig.py (Line : 143) If you install the plugin you can see it working by double clicking a group in the legend. There's also an example showing how to wrap the dialog init within a class with state and to reflect dynamic changes made to the features while the dialog is open https://github.com/nzfarmer1/telemetrylayer/blob/master/featureforms/editformfactory.py https://github.com/nzfarmer1/telemetrylayer/blob/master/tltopicmanager.py (Code's a bit rough as this is a work in progress) Hello, even calling startEditing() programmatically, I don't seem to be able to open the Form in editable mode. Any help with this will be appreciated Thanks, Alexandre Neto On Thu, Oct 2, 2014 at 6:33 AM, Andrew McClure and...@southweb.co.nz wrote: I found this thread very helpful. It seems to be that to the dialog into edit mode this has to be done programmatically by calling startEditing() - not by simply having the layer in edit mode. Can anyone else verify that? Regardless, thanks for the pointers and suggestions in the thread. Much appreciated. On 30/09/2014, at 8:12 pm, Alexandre Neto senhor.n...@gmail.com wrote: Hi On Tue, Sep 30, 2014 at 6:42 AM, Denis Rouzaud denis.rouz...@gmail.com wrote: If you want to open a feature form like doing it from QGIS, just run: iface.openFeatureForm(layer, feature, false, true/false) http://qgis.org/api/classQgisInterface.html#a11b90f38afd09ac5e9f363933ee4a509 Cheers, Denis Actually this how my plugin worked back in QGIS 2.2. But in the latest versions the iface.openFeatureForm() is always in add mode (like setIsAddDialog). That is, after accepting the dialog, it adds a new feature, and does not update my temporary feature. This leaves no room for any changes before the feature commit. I described my problem in the following bug report, and Matthias Kuhn adviced me to create my own Dialog, so that's what I'm trying to do. I would be glad to use iface.openFeatureForm() only https://hub.qgis.org/issues/11099 Thanks for your help Alexandre On 29.09.2014 18:19, Alexandre Neto wrote: Hello Salvatore, You were right, I just needed to import the class first, this have opened the form for me: from qgis.gui import QgsAttributeDialog mc = iface.mapCanvas() layer = mc.currentLayer() temp_feature.setAttributes(attributes) dialog = QgsAttributeDialog(layer, temp_feature, True) dialog.show() But now I can't make it editable. All I can do is cancel the dialog. Thanks for your help, Alexandre Neto On Mon, Sep 29, 2014 at 4:21 PM, Salvatore Larosa lrssv...@gmail.com wrote: Hi, On Mon, Sep 29, 2014 at 4:56 PM, Alexandre Neto senhor.n...@gmail.com wrote: Hello, I'm trying to open an attribute dialog for a temporary feature using QgsAttributeDialog(). but with no luck. Can anyone point me to working example? I'm trying something like this: mc = iface.mapCanvas() layer = mc.currentLayer() dialog = QgsAttributeDialog(layer, temp_feature) dialog.show() I think you should to import the class before and setting the feature owner bool parameter. after this changes the snippet should work fine for you! Regards, -SL -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode ___ 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] setToolTip on Legend Group?
Ok gurus, this one has got me. Any way to access the underlying QTreeWidgetItems? ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QgsAttributeDialog() working example
I found that I had to invoke the feature form myself to get the form into edit mode. layer.startEditing() self.iface.openFeatureForm(layer, feature, True) It was not enough to invoke startEditing from within the feature form init method. Am not sure if this is by design. On 3/10/2014, at 5:26 am, Alexandre Neto senhor.n...@gmail.com wrote: Hello, even calling startEditing() programmatically, I don't seem to be able to open the Form in editable mode. Any help with this will be appreciated Thanks, Alexandre Neto On Thu, Oct 2, 2014 at 6:33 AM, Andrew McClure and...@southweb.co.nz wrote: I found this thread very helpful. It seems to be that to the dialog into edit mode this has to be done programmatically by calling startEditing() - not by simply having the layer in edit mode. Can anyone else verify that? Regardless, thanks for the pointers and suggestions in the thread. Much appreciated. On 30/09/2014, at 8:12 pm, Alexandre Neto senhor.n...@gmail.com wrote: Hi On Tue, Sep 30, 2014 at 6:42 AM, Denis Rouzaud denis.rouz...@gmail.com wrote: If you want to open a feature form like doing it from QGIS, just run: iface.openFeatureForm(layer, feature, false, true/false) http://qgis.org/api/classQgisInterface.html#a11b90f38afd09ac5e9f363933ee4a509 Cheers, Denis Actually this how my plugin worked back in QGIS 2.2. But in the latest versions the iface.openFeatureForm() is always in add mode (like setIsAddDialog). That is, after accepting the dialog, it adds a new feature, and does not update my temporary feature. This leaves no room for any changes before the feature commit. I described my problem in the following bug report, and Matthias Kuhn adviced me to create my own Dialog, so that's what I'm trying to do. I would be glad to use iface.openFeatureForm() only https://hub.qgis.org/issues/11099 Thanks for your help Alexandre On 29.09.2014 18:19, Alexandre Neto wrote: Hello Salvatore, You were right, I just needed to import the class first, this have opened the form for me: from qgis.gui import QgsAttributeDialog mc = iface.mapCanvas() layer = mc.currentLayer() temp_feature.setAttributes(attributes) dialog = QgsAttributeDialog(layer, temp_feature, True) dialog.show() But now I can't make it editable. All I can do is cancel the dialog. Thanks for your help, Alexandre Neto On Mon, Sep 29, 2014 at 4:21 PM, Salvatore Larosa lrssv...@gmail.com wrote: Hi, On Mon, Sep 29, 2014 at 4:56 PM, Alexandre Neto senhor.n...@gmail.com wrote: Hello, I'm trying to open an attribute dialog for a temporary feature using QgsAttributeDialog(). but with no luck. Can anyone point me to working example? I'm trying something like this: mc = iface.mapCanvas() layer = mc.currentLayer() dialog = QgsAttributeDialog(layer, temp_feature) dialog.show() I think you should to import the class before and setting the feature owner bool parameter. after this changes the snippet should work fine for you! Regards, -SL -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode ___ 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] Upload plugins to qqis plugins via a script
Here's a crude PHP script to login and upload your plugin.zip file when it's been updated. Requires libcurl https://github.com/nzfarmer1/qgisplugintools/blob/master/upload.php p.s. have just made a new release of TelemetryLayer - starting to get down to a short list issues that could use a more experienced plugin developer if anyone's keen ... ? :) Andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QgsAttributeDialog() working example
I found this thread very helpful. It seems to be that to the dialog into edit mode this has to be done programmatically by calling startEditing() - not by simply having the layer in edit mode. Can anyone else verify that? Regardless, thanks for the pointers and suggestions in the thread. Much appreciated. On 30/09/2014, at 8:12 pm, Alexandre Neto senhor.n...@gmail.com wrote: Hi On Tue, Sep 30, 2014 at 6:42 AM, Denis Rouzaud denis.rouz...@gmail.com wrote: If you want to open a feature form like doing it from QGIS, just run: iface.openFeatureForm(layer, feature, false, true/false) http://qgis.org/api/classQgisInterface.html#a11b90f38afd09ac5e9f363933ee4a509 Cheers, Denis Actually this how my plugin worked back in QGIS 2.2. But in the latest versions the iface.openFeatureForm() is always in add mode (like setIsAddDialog). That is, after accepting the dialog, it adds a new feature, and does not update my temporary feature. This leaves no room for any changes before the feature commit. I described my problem in the following bug report, and Matthias Kuhn adviced me to create my own Dialog, so that's what I'm trying to do. I would be glad to use iface.openFeatureForm() only https://hub.qgis.org/issues/11099 Thanks for your help Alexandre On 29.09.2014 18:19, Alexandre Neto wrote: Hello Salvatore, You were right, I just needed to import the class first, this have opened the form for me: from qgis.gui import QgsAttributeDialog mc = iface.mapCanvas() layer = mc.currentLayer() temp_feature.setAttributes(attributes) dialog = QgsAttributeDialog(layer, temp_feature, True) dialog.show() But now I can't make it editable. All I can do is cancel the dialog. Thanks for your help, Alexandre Neto On Mon, Sep 29, 2014 at 4:21 PM, Salvatore Larosa lrssv...@gmail.com wrote: Hi, On Mon, Sep 29, 2014 at 4:56 PM, Alexandre Neto senhor.n...@gmail.com wrote: Hello, I'm trying to open an attribute dialog for a temporary feature using QgsAttributeDialog(). but with no luck. Can anyone point me to working example? I'm trying something like this: mc = iface.mapCanvas() layer = mc.currentLayer() dialog = QgsAttributeDialog(layer, temp_feature) dialog.show() I think you should to import the class before and setting the feature owner bool parameter. after this changes the snippet should work fine for you! Regards, -SL -- Salvatore Larosa linkedIn: http://linkedin.com/in/larosasalvatore twitter: @lrssvt skype: s.larosa IRC: lrssvt on freenode ___ 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
Re: [Qgis-developer] standardisation of the editing map tools: modify behaviour of press-pan-release tools
I also would vote for option 3. I do quite a bit of digitising/editing in QGIS. I am used to the default behaviour though there are times i wish for the editing tools to act as Denis has proposed. I think it makes sense for QGIS' default behaviour to be consistent for people coming from other GIS software. In my mind QGIS is foremost a GIS and should behave as such. So i don't think 1 is a good option. also, 2 sees like it could be confusing/frustrating. I don't think its a matter of being afraid of change but rather of being consistent with the behaviour of other GIS software. That being said there are times that i would appreciate having the editing behaviour Denis is suggesting and would be very interested in being able to choose. Andrew On Wed, Sep 24, 2014 at 11:27 PM, Denis Rouzaud denis.rouz...@gmail.com wrote: On 25.09.2014 08:02, Nathan Woodrow wrote: Hey Denis, There is a 4th option of course and that is a key modifier for override to do click-click. I was planning on doing that a while ago when I thought about the same thing. So adding something like shift+click to enabled click-click mode. Not sure if that is better but there is not a good way to change this kind of thing. - Nathan Or we use the modifier for the drag'n'drop, if people like to keep a button mouse pressed, they don't mind using one more key... just joking! Modifiers are a pain when you use the tools a lot. Anyway, if we do this, this can be combined with the options (solution 3) Standard mode: simple click: drag'ndrop, shift: click-click CAD mode: simple click: click-clcik, shift: drag'n'drop On Thu, Sep 25, 2014 at 3:46 PM, Denis Rouzaud denis.rouz...@gmail.com wrote: Hi all, I'll try to summarize. *QEP*: I don't mind doing one, but I think it's a bit early since we are still discussing. *Problematic*: Drag'n'drop map tools prevent from enhancing CAD tools in QGIS. For this, it is *required *to add click-click to all map tools. *Other softwares:* CAD softwares use click-click actions while design and GIS (Mapinfo, what about ESRI?) use drag'n'drop. New users or even current users might be afraid of such a change. *Pros of methods:* Advantages of click-clik: * allow other actions to be done in the movement * allow cancelling the action (this was not pointed out yet) Advantages of drag'n'drop * More intuitive (for non-CAD users, which I believe is the majority) I see *3 (and a half) solutions* (thanks to Matthias for pointing some): 1.* Replace current* drag'n'drop to click-click + simplest solution to maintain - need time for new users to get used to this 2.* Enable both* click-clik and drag'n'drop: a short click will free the node/feature while a long click (*) will allow drag'n'drop. + both solutions are here - might be confusing for a standard user to make a short click and have a node moving without knowing what to do (although escape would cancel the thing) 3. Provide both behaviours and *choose which one to use in options* (e.g. enable CAD behaviour for map tools). + both solutions are here - behaviour not coherent along the different installations half solution: click-click in map tools, allow drag'n'drop in the main identify tool. Like *Microstation*. - this works only for move features (i.e. not feasible for rotate and node tools) Please comment these solutions, to see if there's a consensus. I'll start and vote for 1. ;) Cheers, Denis * The determination of what should be done is made on the distance in pixels from the press position to the release position. If it's small it is considered as a short. Time might also get into consideration: if you long-click but don't move it could be considered as cancel. On 24.09.2014 10:56, Denis Rouzaud wrote: Hi all, There is somehow an inconsistency in the behaviour of the current editing map tools. Some, like add features, uses the left click to trigger the action. Others, like the node tool or move feature use press-pan-release mouse events: * mouse press to select the node/feature * mouse mouse to move it * mouse release sets the position. I would propose to standardise this and for the latter tools propose the following work flow: * left click enables the move * left click again to validate at position * or right click to cancel Why changing this? If you look at CAD software, they also use the proposed approach. And there's a reason for doing so, which is valid for QGIS too. We are looking at improving the CAD tools in QGIS. In this area, I recommend trying the fantastic CADinput plugin made by Olivier Dalang. The plugin works on top of any map tool and enables CAD tools for each of them. The problem with the press-pan-release map tools is that you can't truly interact while you are actually in the action of the map tool (holding the click): * you can't click anymore and this prevents from using intermediate points (you have to use
Re: [Qgis-developer] standardisation of the editing map tools: modify behaviour of press-pan-release tools
I tested the editing tools in ArcMap 10.2 and moving nodes and features is drag and drop. a On Wed, Sep 24, 2014 at 10:46 PM, Denis Rouzaud denis.rouz...@gmail.com wrote: Hi all, I'll try to summarize. *QEP*: I don't mind doing one, but I think it's a bit early since we are still discussing. *Problematic*: Drag'n'drop map tools prevent from enhancing CAD tools in QGIS. For this, it is *required *to add click-click to all map tools. *Other softwares:* CAD softwares use click-click actions while design and GIS (Mapinfo, what about ESRI?) use drag'n'drop. New users or even current users might be afraid of such a change. *Pros of methods:* Advantages of click-clik: * allow other actions to be done in the movement * allow cancelling the action (this was not pointed out yet) Advantages of drag'n'drop * More intuitive (for non-CAD users, which I believe is the majority) I see *3 (and a half) solutions* (thanks to Matthias for pointing some): 1.* Replace current* drag'n'drop to click-click + simplest solution to maintain - need time for new users to get used to this 2.* Enable both* click-clik and drag'n'drop: a short click will free the node/feature while a long click (*) will allow drag'n'drop. + both solutions are here - might be confusing for a standard user to make a short click and have a node moving without knowing what to do (although escape would cancel the thing) 3. Provide both behaviours and *choose which one to use in options* (e.g. enable CAD behaviour for map tools). + both solutions are here - behaviour not coherent along the different installations half solution: click-click in map tools, allow drag'n'drop in the main identify tool. Like *Microstation*. - this works only for move features (i.e. not feasible for rotate and node tools) Please comment these solutions, to see if there's a consensus. I'll start and vote for 1. ;) Cheers, Denis * The determination of what should be done is made on the distance in pixels from the press position to the release position. If it's small it is considered as a short. Time might also get into consideration: if you long-click but don't move it could be considered as cancel. On 24.09.2014 10:56, Denis Rouzaud wrote: Hi all, There is somehow an inconsistency in the behaviour of the current editing map tools. Some, like add features, uses the left click to trigger the action. Others, like the node tool or move feature use press-pan-release mouse events: * mouse press to select the node/feature * mouse mouse to move it * mouse release sets the position. I would propose to standardise this and for the latter tools propose the following work flow: * left click enables the move * left click again to validate at position * or right click to cancel Why changing this? If you look at CAD software, they also use the proposed approach. And there's a reason for doing so, which is valid for QGIS too. We are looking at improving the CAD tools in QGIS. In this area, I recommend trying the fantastic CADinput plugin made by Olivier Dalang. The plugin works on top of any map tool and enables CAD tools for each of them. The problem with the press-pan-release map tools is that you can't truly interact while you are actually in the action of the map tool (holding the click): * you can't click anymore and this prevents from using intermediate points (you have to use the tool several times and repeat the operation as many times as intermediate points you need) * it is not really user friendly to have to press keys while holing the click This is why, changing the map tools behaviour is requested if we want to go further with CAD tools in QGIS. Regarding the future of CAD tools in QGIS, I am quite sure the plugin proposed by Olivier would be a good way to go for QGIS, but it still might be a bit early to integrate it in core. The idea is rather first to extend the API and propose ready to use methods, so it will be easy to implement your preferred solution in a plugin. But first, we need to standardise the map tools. So, the bottom line, any objection to changing the behaviour of: * edit node tool * move feature * rotate feature * move label * rotate label * any other press-pan-release map tool that I am not aware of ??? Best wishes, Denis ___ 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] Module dependencies
Our plugin:https://plugins.qgis.org/plugins/TelemetryLayer/Depends on Memory Layer saver to save its layers. (I need to add this to the docs)I note that some plugin frameworks have a "dependencies" array in their module definitions (metadata.txt for QGIS plugins) and wondered if this was something useful to consider as a feature.Thanks Please consider theenvironment beforeprinting this email.Any information containedwithin this email is for theuse of the recipient onlyand is sent in confidence.The information may notbe copied, distributed orforwarded to any otherparties. This informationmay not be used by anyother person ororganization. If you havereceived this in error,please notify usimmediately by return mailand return the messagewith your notification.If you would like to stopreceiving correspondencefrom this email address,please confirm by returnmail. BEGIN:VCARD VERSION:3.0 PRODID:-//Apple Inc.//Address Book 6.1.2//EN N:McClure;Andrew;;; FN:Andrew McClure ORG:Southweb Ltd.; item1.EMAIL;type=INTERNET;type=pref:and...@southweb.co.nz item1.X-ABLabel:email TEL;type=WORK;type=VOICE;type=pref:+64 (0) 3 2255 169 item2.ADR;type=HOME;type=pref:;;2122 Otauta-Tuatapere Rd.;RD1 Tuatapere;;;New Zealand item2.X-ABADR:us NOTE:Southweb item3.URL;type=pref:http://southweb.co.nz item3.X-ABLabel:_$!HomePage!$_ IMPP;X-SERVICE-TYPE=Skype;type=WORK;type=pref:skype:kiwifx PHOTO;ENCODING=b;TYPE=JPEG:/9j/4AAQSkZJRgABAQAAAQABAAD/4QBARXhpZgAATU0AKgAA AAgAAYdpAAQBGgAAAqACAAQByKADAAQByAD/2wBDAA IBAQIBAQICAQICAgICAwUDAwMDAwYEBAMFBwYHBwcGBgYHCAsJBwgKCAYGCQ0JCgsLDAwMBwkN Dg0MDgsMDAv/2wBDAQICAgMCAwUDAwULCAYICwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCwsLCw sLCwsLCwsLCwsLCwsLCwsLCwsLCwv/wAARCADIAMgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEA AAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhBy JxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZ WmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxM XGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAA AAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFE KRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVm Z2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyM nK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9/ACiiigA AACiiigAAACiiigAAACiiigAAACiiigAAACikV NrMck7vU8D6UtABRRRQAAABRRRQAAABRRRQAAABRRRQAAF FFFABRRRQAAABRRRQAAABRRRQAAABRRRQAAABRRRQA AABRRRQAUUVn+IvE1n4YsjNqsqoOir/E59gOaANCsnXfG+meHFJ1a6SMg429TXNRza 78RGYyb9G0zoMDMswP1PHHtWxoHw50rQ23wwedOfvSycs35UCvfYbafFGz1B8WFrfzKeNyouP/ Qq1LfxCtwoItbtc+qr/jV2GIRjEYCgelSUDII79JOquv8AvCplYOMrSkZ61xfxb+O3hv4JHTz8 QLz7EmoyFI3Mbsox1JKqQPxxW+Gw1bGVFRoQcpPZJXb+RzYvGUMBSdfEzUILdt2Svpu/M7Sisv wp410jxvpyXXhLUrPUYHG7dBKr4+oB4/GtSs6lOVKThNWa6M2p1YVoqdOScXs1qgoooqCw AACiiigAAACiiigAoopGYKpLHAHJoAz/ABP4lt/CukyXeon5VB2qDy5wTge/Fc n4f8P3PivUf7W8aDfn/UWj8rEOmSOAT1PTvUVzMPiB42dpcnTtIcrGOnmSA8n3+77da3vEHizT PBWlSX/i2+ttPtIh80kzhR6cDqfwq4QlUkoQV2+i3InONOLnN2S6vY2YRtXwAOgqZelfJf xb/wCCsvgnwjM9r8NLe88QXSllMggKwgg4B+ZkJFeMaz/wVm+IerXTHRNP8P2dvnK5gkMn4/vS K+6y/wANM/x8FU9hyJ/zvlf3b/gfn2aeKfDuVzdN1+d/3FzL79vxP0eTpTq/NrRv+CnXxNt5N0 50W5BYNtlt2x9PlYcV678LP+Cpy3MkcXxZ0cQgj5p7GI7Qfo0hP6VWO8Nc6wUXJQjP/C7v7nY4 8D4v8O42ahKpKnfrKNl96bPsivEf2gvjv8M9M8aQ+Efjrp0Fy0i7o5bu2ieFNwXoznI4fqK9L+ HfxX0H4q6AupeCL+K9tz1AyHU4zgqcEV5p4j+LHwy+O/jDU/A3j+F01CzkaApdxvCJGzsyj8A9 f1rw8kwcqOKnLE0KjVNe9yaTh05tunbT1PpOIMwp4nBU1hMRSTqtcntLShU68u/Xvr6HB+If2b 9e+DDr4v8A2SNemm0lR50ukedJNDOnQ7Ms4PB/u8YzXsH7Of7R2m/HjQXEUb2Ot2ChL+ylYb4X yVPTnGVPYV4xHpGvfsHeMoWsZZdW+HmpSbZA4EktkT8oJIC99nqKtftDeGf+Fc67pXxf+CpMtt cus2pxqdyyw4VywU89EbPPevrcbhI51GFGvUVRzX7mvazbX/Lup/e83qnbVpn55gs0qcOzq4nC 0nTjSa+sYa91GL/5fUf7vVpWTV9E0fU9FZPgbxhaePfCllq2iyLLb3ke9SPrg/qDWtX5lUpypT cJqzTs15n7XRrQxFONWm7xkk011T2YUUUVBoABRRRQAAABRRRQAVz3xL8TDw14 akZTiW4/dR89zgf1roa8b/bZ+K2n/Bb4XJ4i8SJJJb6e7SBEXJdsAKMZH8RHetsNh6mLqwo0le Umkl3b2McRXhhqUqtR2jFNt9ktzG+Ln7Rfhz9kn4VQ6j45mV7y5Utb2gcCa6k2bjxycZwM4P3h X5rftE/tg+Lf2nfEUk3iu9ntdKBHkabFKfJjAHBIGAx6nOB1rhPjX+0jrv7TPjq513xlcu8LyM bO2xtjtoi2VUKO4GBnk8dTWJYtgiv7B4E8NsLwph44nFRU8W1q91Hyj+r3fofyTx/4hYriatLC 4aThhU9Fs5ecv0Wy9Te0oBQAAK3LMcDPFYWmuOK3bFvlBNfXYw/LGbenrlegrbsk+QZrD0+TNb VjMCoznivm8Qncyq3toei/BD4w6z8E/FNvqPhS5lWFZA09qHIjuF5BBHTOCcHBr688T/Dfwz+2 d8MLbxR4JEOm+KbdBN58AHnJMFI2OwwfvLwT/d6V8Hw3u0YzjNe4/sLfHZ/hl8WYtM1CZv7L13 bbuhG5UkLqFbrxgF/z6V8FxZk9SdN5ngPdxNPW6+1Fbxa66d/Q+68PeJI0cR/Yea+/gqztZ/Yk 9pRfTXe3qfSHwK8ar+0p8GdZ8LfEiNZdZ00G1ukk+ZmICssmDz94j8utYX7Jl7/wkvhrxn8LPG WJjoBktIjL826J2lXgH0G0VofCvwHrng/9tDxNd2envb+HtUtw3mhl2OcvjjOQche1Y/wbR9O/ 4KF+NILZCkE9g0r8cM2YyD/48a/Oq0KMqeNp4dpQdOGIik/gneN0u27VvQ/b8LHEwqZbWxqbqq pUws21b2lNqXK332Tv3ubP/BP7xLLZeGte8I6pIXm8P6jIIQ3BEJWJhx/vSNX0RX
Re: [Qgis-developer] Telemetry Layer (MQTT Integration) - alpha released
Paolo Web page created Screenshot uploaded Download and meta definitions updated. See: http://www.southweb.co.nz/telemetrylayer Reminds me of the joke about a plumber's own bathroom. thanks Andrew On 18/09/2014, at 6:02 pm, Paolo Cavallini cavall...@faunalia.it wrote: Il 18/09/2014 02:47, Andrew McClure ha scritto: Hi Paolo I've followed the submission process and uploaded here. http://plugins.qgis.org/plugins/TelemetryLayer/ That said, it is only really ready for developers to look at as there is much finishing work to be done. Thanks Andrew. I'll check it ASAP. Could you please check the home page? I get: Digi Sense homepage. See http://southweb.co.nz More later. All the best. -- Paolo Cavallini - www.faunalia.eu Corsi QGIS e PostGIS: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Telemetry Layer (MQTT Integration) - alpha released
Dear QGIS developers, I have submitted my first QGIS plugin to the world. It is experimental, unfinished, and no doubt has many defects. For the past 3 months or so between farm and family chores I have worked to bring a vision to fruition - combining an IoT (Digimesh) sensor network with the QGIS platform serving as a human machine interface (HMI). It struck me that sensors are locational by nature; and that QGIS provides an excellent ready made HMI and deployment framework. Our work on the wireless sensor network continues in the background, but the Telemetry Layer plugin has been kept generic so that developers of other MQTT related services can integrate their platforms. A few disclaimers: - this is my first python development so please forgive variances in coding style as I mature. - I love developing on my Mac, and recent tests on Windows and Linux indicate stability issues ( which seem for the most part have been dealt to on the Mac ) - I need help. The project is at a stage where more eyes would be beneficial. - I am new to running an open source project. My recent background has been running a Drupal web dev/hosting shop using paid contractors - so please bare with me as I familiarise myself with the protocols of voluntary collaboration Acknowledgements - a big thanks to: - Larry Shaffer who helped me establish my initial dev. environment - Chris Cook - another New Zealander - with his pointers on the user interface - Matthias who is assisting with the custom setEditForm ( which sort of works on my Mac but not on any other platform currently ) GIT Repo can be found here: https://github.com/nzfarmer1/telemetrylayer Andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Telemetry Layer (MQTT Integration) - alpha released
Hi Paolo I've followed the submission process and uploaded here. http://plugins.qgis.org/plugins/TelemetryLayer/ That said, it is only really ready for developers to look at as there is much finishing work to be done. Thanks Andrew On 18/09/2014, at 5:11 am, Paolo Cavallini cavall...@faunalia.it wrote: Il 17/09/2014 13:01, Andrew McClure ha scritto: Dear QGIS developers, I have submitted my first QGIS plugin to the world. Hi Andrew, where did you submit it? I cannot find it in the list of unpublished plugins. I'm available for help in speeding up the publication. All the best. -- Paolo Cavallini - www.faunalia.eu Corsi QGIS e PostGIS: http://www.faunalia.eu/training.html ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Stress about release plans
It a chicken/egg problem. We need to have some stable, relatively bug free version of QGIS with predictable (and somewhat slow ) release cycles before it's acceptable in large organisations (with money to spend on development/bug fixing). I think this is true, though I dont have experience with large organizations. As a user i would love to have a more stable LTS version and if i could i would earmark my donations specifically for supporting an LTS and, i think, would contribute more. But since it doesnt exist, i cant help fund it with my small donations. Also, that is something that i might be able to get my work to donate small amounts for, though as a small grant-funded non-profit costs that are not directly billable to grants are very hard to pay for. andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] [Qgis-user] Stress about release plans
Is it a common practice for developer to fill feature requests for Documentation and help whenever they create new features? This would still free developers to keep creating good stuff, and help others to keep track of what needs attention in Docs. Using the visual changelog and scrolling the commits messages might not be reliable enough. +1 In reading this thread I realised I don't know how communication between developers and documenters works in QGIS, but it seems to me that the previously mentioned idea of tying documentation and development together doesn't necessarily mean that developers would be required to write the documentation. (Obviously someone would but I don't see why that would have to be the dev.) I had the same thought as Alexandre about filing documentation request to have a doc team work on it? This may require QGIS to prioritize documentation differently than it currently does and that may not be the direction people want to go, but from what others have said it sounds like there might be some reason to shift current practice. Also, I was just looking at the QGIS homepage and found it quite difficult to figure out how to contribute to documentation. Am I missing something? I was expecting that contributing documentation would be one of the subheadings under Get Involved. I instead found it under Translate Translate QGIS into your language -- and then had to scroll down and find the documentation section, which hasn't been written, and click over to gtihub, which in turn includes no information on how to actually contribute. After some searching I was able to find the Manual Writing page in the wiki. It seems like a link to the wiki page would be useful on the Get Involved page somewhere as well as some information on how to contribute to other documentation like help files. andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Accessing Plugin metadata
Sorry guys but this one has taken a bit too long to resolve: iface.pluginManagerInterface().pluginMetadata(uname) returns None iface.pluginManagerInterface().pluginMetadata(ugeneral.name) returns None The fall back is of course something like this: self.metadata = ConfigParser() self.metadata.read(os.path.join(self.plugin_dir,'metadata.txt')) But then that's cheating a bit ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Opening Views-Panels-Log Messages
Is it possible to invoke/open this dock via a PyQt call? thx. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Fwd: Bug in Georeferencer
I've found a small bug in the Georeferencer plugin. When I tick the Use 0 for transparency when needed and click Start georeferencing against an image that is rotated, I end up with a GeoTiff that has 3 bands, and black triangles in each corner. However, if I click Generate GDAL script and manually run the generated commands, a 4 band GeoTiff is created, with Band 4 as an alpha layer and the 4 corner triangles marked as transparent. It seems that Georeferencer is not applying the -dstalpha flag when running gdalwarp (this is the only difference in the generated script when the Use 0 for transparency when needed is toggled). Andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Problem configuring own repository/plugins
I'm trying to load my second test plugin to my own repository. The first installs into QGIS without difficulty, but I'm missing something with the second. I get a message from the plugin installer that Plugin has disappeared - actually it doesn't install in its own directory but puts its files and sub-directory directly into python\plugins. I've clearly got something wrong, but as far as I can see the plugins.xml entries only differ by file name and the zip file structure looks the same. What actually determines exactly where the files are written? Andrew Chapman ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] New Labeling
Hi Andreas Yes they way that you have described generally seems logical with the exception that I don't understand why it should be necessary to specify fields for distance, X Y before rotation and position are enabled. I would have thought that all position options could be selected on a case-by-case basis with the defaults used where options aren't specified - that way there would be no need to create dummy fields. Is there a reason why this default solution is inappropriate? Andrew Date: Tue, 13 Sep 2011 21:39:20 +0200 From: Andreas Neumann a.neum...@carto.net Subject: Re: [Qgis-developer] New Labeling: To: qgis-developer@lists.osgeo.org Message-ID: 4e6fb168.9060...@carto.net Content-Type: text/plain; charset=ISO-8859-1 Hi Andrew, The logic is that one often wants label positions separate from the actual geometry. The new label tool allows x/y positions not only for point geometries (where one can use the point geometry), but also for line and area features. If x/y columns are empty, QGIS uses the featurue geometry, if one manually moves the labels, x/y columns are used. This way one can mix manual and automatic labeling. If you want fully automatic labeling just create dummy x/y columns and never manually move labels around. Does it sound illogical to you? Andreas ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] New Labeling:
I'm trying to find a way to use data defined positioning with the new labelling to replicate what is possible in the old labelling, namely aligning and rotating about the point specified for a layer. With the new labelling, fields have to be selected for label distance X Y coordinates before the horizontal vertical alignment plus rotation are enabled. Is there a logical reason why alignment and rotation aren't available by default? I tried creating a dummy field (always NULL values) and selecting it for distance, X Y. This enables the other fields (to the extent that I can select them), but they seem to have no effect. Am I missing something or do I need to file a bug report? Andrew ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
RE: [Qgis-developer] Georeferencing headeaches
Hi Alister I find that before I define any points with a BMP loaded the georeferencer window coordinates have no relationship to the pixel position. So it doesn't work with zero points! I then save the BMP as a TIFF and try again. This time the georeferencer window coordinates are displayed in pixels as expected and the image can be georeferenced as expected. Can anyone else reproduce this behaviour? Andrew Chapman Hi Andrew. I think I have always got stupid results like that when trying to use more than two control points with the linear transformation. Does it work if you only use two points? I did think there was a bug report for this, but I can't see it now. Alister ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Georeferencing headeaches
I've used the georeferencer a number of times without difficulty (1.7.0, Windows) on a number of occasions, but I've run into difficulties a couple of times as described below. I'm trying to georeference a BMP (4804 x 3084 pixels) using four points, linear nearest neighbour transform and EPSG:27700. The message at the bottom of the screen says Transform:Linear Translation (399639, 182204) Scale (2.10238e-06, 2.14539e-06) Rotation: 0 Mean error: 1.82928e+06. The points file contains: mapX,mapY,pixelX,pixelY,enable 399725.746871799987275,182064.111945799988462,40058150.943396233022213,-1346 0679.245283015072346,1 399773.490492700017057,182058.14399326662,62315320.754716999828815,-1767 9358.490566037595272,1 399756.51912749893,182072.939542400010396,54779886.792452841997147,-1017 3018.867924522608519,1 399763.66823737604,182090.78123394583,58678528.301886811852455,-1997 509.433962255716324,1 The mapX/Y values seem sensible, but the pixelX/Y values are far too large... and shouldn't they be integers? It generates the following world file: 0.02109413289 0 0 -0.02133093642 399641.036519734247122 182094.590552107954863 The raster loads but is about 10mm wide rather than about 200m. I'm not sure exactly why certain images are a problem, but am starting to wonder if it is linked to trying to transform into a relatively small target area. Has anyone else seen this type of problem or is there anyone who can suggest where I may be going wrong... or should I just file a bug report? Andrew Chapman ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
RE: [Qgis-developer] Georeferencing headeaches
There was a .WLD for a file with a different name - I deleted it, the points file... and tried again. No improvement. The points have figures like srcX = 32749572.45. Given the source image is only 4804 x 3084 pixels, why would I get a value four orders of magnitude greater than the pixel count? Andrew Chapman -Original Message- From: Maxim Dubinin [mailto:s...@gis-lab.info] Sent: 11 September 2011 15:59 To: Andrew Chapman Cc: qgis-developer@lists.osgeo.org Subject: Re: [Qgis-developer] Georeferencing headeaches not necessarily, is there anything like *.wld or *.bpw file close to your raster? Вы писали 11 сентября 2011 г., 18:52:41: AC As far as I can tell, no. I'm aware that there are issues with a previously AC georeferenced TIFF, but I'm using a BMP and didn't think that this can store AC metadata. AC Andrew Chapman AC -Original Message- AC From: Maxim Dubinin [mailto:s...@gis-lab.info] AC Sent: 11 September 2011 15:39 AC To: Andrew Chapman AC Cc: qgis-developer@lists.osgeo.org AC Subject: Re: [Qgis-developer] Georeferencing headeaches AC Are you trying to georeference a raster that is already georeferenced? AC I've used the georeferencer a number of times without difficulty (1.7.0, AC Windows) on a number of occasions, but I've run into difficulties a AC couple AC of times as described below. AC I'm trying to georeference a BMP (4804 x 3084 pixels) using four points, AC linear nearest neighbour transform and EPSG:27700. The message at the AC bottom AC of the screen says Transform:Linear Translation (399639, 182204) Scale AC (2.10238e-06, 2.14539e-06) Rotation: 0 Mean error: 1.82928e+06. AC The points file contains: AC mapX,mapY,pixelX,pixelY,enable AC AC 399725.746871799987275,182064.111945799988462,40058150.943396233022213,-1346 AC 0679.245283015072346,1 AC AC 399773.490492700017057,182058.14399326662,62315320.754716999828815,-1767 AC 9358.490566037595272,1 AC AC 399756.51912749893,182072.939542400010396,54779886.792452841997147,-1017 AC 3018.867924522608519,1 AC AC 399763.66823737604,182090.78123394583,58678528.301886811852455,-1997 AC 509.433962255716324,1 AC The mapX/Y values seem sensible, but the pixelX/Y values are far too AC large... and shouldn't they be integers? AC It generates the following world file: AC 0.02109413289 AC 0 AC 0 AC -0.02133093642 AC 399641.036519734247122 AC 182094.590552107954863 AC The raster loads but is about 10mm wide rather than about 200m. AC I'm not sure exactly why certain images are a problem, but am starting AC to AC wonder if it is linked to trying to transform into a relatively small AC target AC area. AC Has anyone else seen this type of problem or is there anyone who can AC suggest AC where I may be going wrong... or should I just file a bug report? AC Andrew Chapman - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1392 / Virus Database: 1520/3889 - Release Date: 09/10/11 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Testing and releases
I think that there are (at least) two different types of testing that are valuable for a project like QGIS and both play important roles. Different people use different names, but here's my version... 1) White box: This is very much in the hands of the developer and is aimed at proving the functionality of their code - stop the bug before it gets out of your own hands. This type of testing knows how the code should work and typically, among other things, explores the boundary conditions. 2) Black box: This has no special knowledge of how the internals works and tests as a dumb user... that can be relied on to provide the same test coverage every time. One obvious use of this is for regressions testing of the finished build, but I would suggest that with minor enhancements it could be used to help ease some of the user documentation tasks. QGIS supports multiple languages and operating systems, is released regularly but, consequently, it is hard to produce user manuals and tutorials with the most appropriate screen shots, etc. If a black box type of test harness were developed that could be trained (e.g. recording keystrokes and mouse commands with a way to edit them) plus the ability to capture images of screen objects (windows, dialogs, buttons, icons) and save them to named files, this would present further opportunities. The same test (script?) could be run on builds for different operating systems, languages and versions. A standard set of build specific images would be generated and, assuming standard file names and locations, could automatically be imported into the various user documents. There would still need to be some manual text editing, but the labour intensive screenshot processing would be removed. This must be a common requirement across projects, has anyone come across any tools that already exist? Andrew Chapman ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Re: 1.7 release
+1 for release as a beta. I share Paolo's unease about a full release with 60 major bugs. It takes much more effort to build a good reputation than to loose one. In the documentation, we are quick to highlight new tools and enhancements, but how about adding something on Known Issues and Workarounds? Not nearly as good as a fix, but better than nothing. It is also ok asking for sponsorship to fix bugs, but most people have no way of knowing what sort of sums would make a difference. Or is it a case of if you need to ask the price, you can't afford it? Andrew Chapman ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer