[QGIS-Developer] Plugin [1361] Virtual Raster Builder approval notification.
Plugin Virtual Raster Builder approval by zimbogisgeek. The plugin version "[1361] Virtual Raster Builder 0.2" is now approved Link: http://plugins.qgis.org/plugins/vrtbuilderplugin/ ___ 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] QgsLayout.itemById returns wrong object
On 23 January 2018 at 22:34, Enrico Ferregutiwrote: > I'm trying to programmatically set a QgsLayoutPicture content in QGIS3.0: > > 1) I create a new print composition and I name it 'test' > 2) I create a picture frame in the composition and I call it 'picture' > 3) I run the following code: > > from qgis.core import QgsProject > myLayout = QgsProject.instance().layoutManager().layoutByName('test') > myLayoutPicture = myLayout.itemById("picture") > myLayoutPicture.setPicturePath("path to an image") > > and I get the following Exception: > AttributeError: 'QgsLayoutItem' object has no attribute 'setPicturePath' > > If I inspect myLayoutPicture object I found it is a qgis._core.QgsLayoutItem > not a QgsLayoutPicture > > Is this a correct behaviour or is it an issue? How can I get the right > Layout object? This became an issue after a certain sip version. It affects QGIS 2.x also, and seems to be caused by sip being unable to automatically cast classes which use multiple inheritance (like QgsComposerItem, QgsLayoutItem). The consequence is that Python is only aware of the base class, not the actual item subclass. I can't find anyway to fix this properly. So I hack around by forcing sip to manually cast to the correct item type, e.g. by inserting two lines* which look like this: # screw you sip, I'll just manually cast real_item = sip.cast(item, QgsLayoutItemPicture) It's not pretty, but it works... Nyall * the first line is critical for the fix to work correctly ___ 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] Processing CRS Warnings useless?
On 24 January 2018 at 03:13, matteowrote: > Hi devs, > > testing the new release I notice that in the Processing options there > are still the 2 options to warn the user if the CRS among layers don't > match. > > Processing is correctly not warning me with 2 layers with different CRS > during a normal difference and intersection operation. That's because well behaved algorithms now handle this automatically for users... helping them not want to smash their screens. > Isn't it useless to have this option with the new auto-reprojecting system? Well, algorithms which CAN'T transparently reproject (for whatever reasons) can return the QgsProcessingAlgorithm.FlagRequiresMatchingCrs flag. If this is encountered then the CRS warning will be still shown. Nyall ___ 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] Plugin [1357] Least-Cost-Paths Network approval notification.
Plugin Least-Cost-Paths Network approval by zimbogisgeek. The plugin version "[1357] Least-Cost-Paths Network 0.1.1 Experimental" is now approved Link: http://plugins.qgis.org/plugins/LCPNetwork/ ___ 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] Plugin [1381] MapFinder Brasil approval notification.
Plugin MapFinder Brasil approval by zimbogisgeek. The plugin version "[1381] MapFinder Brasil 1.2" is now approved Link: http://plugins.qgis.org/plugins/MapFinder/ ___ 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] Plugin [833] Select Within approval notification.
Plugin Select Within approval by zimbogisgeek. The plugin version "[833] Select Within 0.3" is now approved Link: http://plugins.qgis.org/plugins/SelectWithin/ ___ 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] Plugin [793] Multi Ring Buffer approval notification.
Plugin Multi Ring Buffer approval by zimbogisgeek. The plugin version "[793] Multi Ring Buffer 0.4" is now approved Link: http://plugins.qgis.org/plugins/Multi_Ring_Buffer/ ___ 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] Plugin [1350] Mascaret approval notification.
Plugin Mascaret approval by zimbogisgeek. The plugin version "[1350] Mascaret 0.0.5 Experimental" is now approved Link: http://plugins.qgis.org/plugins/Mascaret/ ___ 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] Plugin [1305] Calidad-CAR approval notification.
Plugin Calidad-CAR approval by zimbogisgeek. The plugin version "[1305] Calidad-CAR 0.11" is now approved Link: http://plugins.qgis.org/plugins/CalidadCAR/ ___ 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] Factorizing a dbf
Il 24/01/2018 07:37, Nyall Dawson ha scritto: > How would you see this working within processing? I guess you could > select all the desired columns, and then an auto-generated field name > could be made for each new field based on the original column. It's > probably best left to a separate algorithm though. yes, perfect >> one further improvement would be to automatically add in the layer >> property style the summary table as Value map. > > Good idea. This relates to a request on this list a week or so ago, > where someone wanted an algorithm to be able to specifically set the > style of generated layers. There's currently no support for this in > processing algorithms, but there's no reason (well... apart from > time/cost) we can't add it in for >= 3.2. this is the way GRASS has worked from years; very practical, I miss that in QGIS. >> should I open feature reqs for this? > > Yes will do it for both ASAP thanks a lot for your thoughts -- Paolo Cavallini - www.faunalia.eu QGIS & PostGIS courses: http://www.faunalia.eu/training.html https://www.google.com/trends/explore?date=all=IT=qgis,arcgis ___ 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] Factorizing a dbf
On 24 January 2018 at 16:25, Paolo Cavalliniwrote: > Hi Nyall, > > Il 23/01/2018 01:16, Nyall Dawson ha scritto: > >> Option 1: >> Run the "Add unique value field index" algorithm to add an >> autogenerated code for each unique category. Then, run the "List >> unique values" algorithm selecting both the original field and the >> newly created field for the "target fields" in order to get a summary >> table mapping the new categories to their original values (or wait >> until https://github.com/qgis/QGIS/pull/6132 is merged, which adds >> creation of this summary table as an option to the alg... then you can >> do this with a single algorithm execution) > > great, thanks for the improvement! this solves things brilliantly. > what would be great is the possibility of doing the same thing for more > than a column in the same execution. it is cumbersome to do it over and > over for a large table. How would you see this working within processing? I guess you could select all the desired columns, and then an auto-generated field name could be made for each new field based on the original column. It's probably best left to a separate algorithm though. > one further improvement would be to automatically add in the layer > property style the summary table as Value map. Good idea. This relates to a request on this list a week or so ago, where someone wanted an algorithm to be able to specifically set the style of generated layers. There's currently no support for this in processing algorithms, but there's no reason (well... apart from time/cost) we can't add it in for >= 3.2. > should I open feature reqs for this? Yes Nyall ___ 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] Factorizing a dbf
Hi Nyall, Il 23/01/2018 01:16, Nyall Dawson ha scritto: > Option 1: > Run the "Add unique value field index" algorithm to add an > autogenerated code for each unique category. Then, run the "List > unique values" algorithm selecting both the original field and the > newly created field for the "target fields" in order to get a summary > table mapping the new categories to their original values (or wait > until https://github.com/qgis/QGIS/pull/6132 is merged, which adds > creation of this summary table as an option to the alg... then you can > do this with a single algorithm execution) great, thanks for the improvement! this solves things brilliantly. what would be great is the possibility of doing the same thing for more than a column in the same execution. it is cumbersome to do it over and over for a large table. one further improvement would be to automatically add in the layer property style the summary table as Value map. should I open feature reqs for this? All the best, and thanks again. -- Paolo Cavallini - www.faunalia.eu QGIS & PostGIS courses: http://www.faunalia.eu/training.html https://www.google.com/trends/explore?date=all=IT=qgis,arcgis ___ 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] Vector Layer Properties Dialog does not return
Dear all, I am experiencing a very painful issue I wasn't able to fix up to now. I cannot use the vector layer properties as it freezes the application when exiting the dialog, either by apply or cancel. It does not affect the raster layer dialog. I am on mac, but the original reporter is on linux. Is anyone else experiencing it? https://issues.qgis.org/issues/17832 Cheers, Denis ___ 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] Processing CRS Warnings useless?
Hi devs, testing the new release I notice that in the Processing options there are still the 2 options to warn the user if the CRS among layers don't match. Processing is correctly not warning me with 2 layers with different CRS during a normal difference and intersection operation. Isn't it useless to have this option with the new auto-reprojecting system? Thanks! Cheers Matteo ___ 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] QgsLayout.itemById returns wrong object
2018-01-23 14:34 GMT+02:00 Enrico Ferreguti: > from qgis.core import QgsProject > myLayout = QgsProject.instance().layoutManager().layoutByName('test') > myLayoutPicture = myLayout.itemById("picture") > myLayoutPicture.setPicturePath("path to an image") > > and I get the following Exception: > AttributeError: 'QgsLayoutItem' object has no attribute 'setPicturePath' Which QGIS revision do you use? I can not reproduce your issue on master, all works as expected. -- Alexander Bruy ___ 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] QgsLayout.itemById returns wrong object
On Tue, Jan 23, 2018 at 1:34 PM, Enrico Ferregutiwrote: > I'm trying to programmatically set a QgsLayoutPicture content in QGIS3.0: > > 1) I create a new print composition and I name it 'test' > 2) I create a picture frame in the composition and I call it 'picture' > 3) I run the following code: > > from qgis.core import QgsProject > myLayout = QgsProject.instance().layoutManager().layoutByName('test') > myLayoutPicture = myLayout.itemById("picture") > myLayoutPicture.setPicturePath("path to an image") > > and I get the following Exception: > AttributeError: 'QgsLayoutItem' object has no attribute 'setPicturePath' > > If I inspect myLayoutPicture object I found it is a > qgis._core.QgsLayoutItem not a QgsLayoutPicture > > Is this a correct behaviour or is it an issue? How can I get the right > Layout object? > Yes, it is the correct behavior, the method returns a pointer to the base class which is QgsLayoutItem. In the C++ API there is a template method to retrieve all objects of a certain type but it's not exposed to Python (that's not even possible with current SIP I think): template void layoutItems( QList ) const SIP_SKIP Sorry but I don't have an answer to your last question. -- Alessandro Pasotti w3: www.itopen.it ___ 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] QgsLayout.itemById returns wrong object
I'm trying to programmatically set a QgsLayoutPicture content in QGIS3.0: 1) I create a new print composition and I name it 'test' 2) I create a picture frame in the composition and I call it 'picture' 3) I run the following code: from qgis.core import QgsProject myLayout = QgsProject.instance().layoutManager().layoutByName('test') myLayoutPicture = myLayout.itemById("picture") myLayoutPicture.setPicturePath("path to an image") and I get the following Exception: AttributeError: 'QgsLayoutItem' object has no attribute 'setPicturePath' If I inspect myLayoutPicture object I found it is a qgis._core.QgsLayoutItem not a QgsLayoutPicture Is this a correct behaviour or is it an issue? How can I get the right Layout object? Regards. Enrico Ferreguti ___ 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] Example script for Processing in QGIS 3
Hi Nyall, scripts seem way more complex then before. I guess it is the simplest way that could be found to accomodate Processing scripts to the refactored code. Some questions from the previous scripts examples: 1) Is automatic output / sink parameter conversion impossible to obtain? In [1] self.parameterAsSink is used, and it's not very clear to me what the second method output (Biggest_parts) represent. Input / source (Polygons) is used directly instead, as it was in QGIS 2.x 2) There are some global vars that appear to be automagically injected by the script execution context, like "parameters" and "context". Are they documented somewhere? 3) The test scripts use different approaches. Centroids.py use source / sink, while the others two define vector / vectorDestination. Are they supposed to work? Thanks! Giovanni [1] https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/scripts/Keep_n_biggest_parts.py#L19 2018-01-23 11:59 GMT+01:00 Nyall Dawson: > On 23 January 2018 at 18:28, Alexander Bruy > wrote: > > There are some scripts in the Processing tests > > https://github.com/qgis/QGIS/tree/master/python/plugins/ > processing/tests/testdata/scripts > > > > There's also https://github.com/qgis/QGIS/blob/master/python/plugins/ > processing/algs/qgis/scripts/Keep_n_biggest_parts.py > , although I'd ideally like to port this script to a proper algorithm > before release. > > Nyall > ___ > 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
Re: [QGIS-Developer] Example script for Processing in QGIS 3
On 23 January 2018 at 18:28, Alexander Bruywrote: > There are some scripts in the Processing tests > https://github.com/qgis/QGIS/tree/master/python/plugins/processing/tests/testdata/scripts > There's also https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/scripts/Keep_n_biggest_parts.py , although I'd ideally like to port this script to a proper algorithm before release. Nyall ___ 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] Plugin [1381] MapFinder Brasil approval notification.
Plugin MapFinder Brasil approval by zimbogisgeek. The plugin version "[1381] MapFinder Brasil 1.1" is now approved Link: http://plugins.qgis.org/plugins/MapFinder/ ___ 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] QGIS3 Processing Modeler - some bugs encountered
Thanks Nyall ! 2018-01-23 1:57 GMT+01:00 Nyall Dawson: > On 19 January 2018 at 18:26, kimaidou wrote: > > Dear devs, > > > > I am looking at Processing for QGIS3, and would like to share some bugs I > > discovered while playing with models. I have not found related issues in > the > > hub. I will add them after some feedback. Please point me the the issues > if > > they do exists in Redmine > > > > * Number input is not proposed in algorithms. For example, after adding > an > > input of type Number, you cannot anymore use this input as a value for > the > > buffer size in the QGIS fixed buffer alg : no combobox is shown to the > user, > > just a standard text input. > > The interface here isn't fantastic - but you need to hit the '...' > button to the right of the numeric parameter and then you'll see the > input exposed as a variable for use. > > We need https://github.com/qgis/QGIS-Enhancement-Proposals/issues/84 > in order to improve this. > > > * Grid alg : the user can choose the extent of one of the vector layers ( > > inputs or results of alg), bug when you run the model, the extent is > empty > > and the grid alg failed. > > Confirmed - PR with fix is https://github.com/qgis/QGIS/pull/6133 > > Nyall > ___ 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] Example script for Processing in QGIS 3
There are some scripts in the Processing tests https://github.com/qgis/QGIS/tree/master/python/plugins/processing/tests/testdata/scripts 2018-01-23 10:19 GMT+02:00 Anita Graser: > On Jan 23, 2018 1:19 AM, "Nyall Dawson" wrote: >> >> On 23 January 2018 at 04:12, Anita Graser wrote: >> > On Sat, Jan 20, 2018 at 12:40 PM, Anita Graser >> > wrote: >> >> >> >> Do we have any working example scripts for Processing in QGIS 3? >> >> I tried using "Get scripts from on-line collection" but they all seem >> >> broken: >> >> https://issues.qgis.org/issues/17897 >> > >> > >> > Is there any documentation how Processing scripts have changed? >> >> See https://github.com/qgis/QGIS/pull/4841 - needs completion and >> merging though. > > > Thank you for the pointer Nyall. That's certainly a start but as you mention > correctly, it still seems incomplete. For example, it currently doesn't help > me figure out how to fix > > This script has a syntax errors. Problem with line: ##output=output vector > > There is a line in the PR about vector outputs but it's a bit cryptic: > > - OutputVector -> > - processAlgorithm has a new signature > Use parameterAsSink instead of getOutputFromName > > 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 -- Alexander Bruy ___ 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] Example script for Processing in QGIS 3
On Jan 23, 2018 1:19 AM, "Nyall Dawson"wrote: > On 23 January 2018 at 04:12, Anita Graser wrote: > > On Sat, Jan 20, 2018 at 12:40 PM, Anita Graser > wrote: > >> > >> Do we have any working example scripts for Processing in QGIS 3? > >> I tried using "Get scripts from on-line collection" but they all seem > >> broken: > >> https://issues.qgis.org/issues/17897 > > > > > > Is there any documentation how Processing scripts have changed? > > See https://github.com/qgis/QGIS/pull/4841 - needs completion and > merging though. > Thank you for the pointer Nyall. That's certainly a start but as you mention correctly, it still seems incomplete. For example, it currently doesn't help me figure out how to fix This script has a syntax errors. Problem with line: ##output=output vector There is a line in the PR about vector outputs but it's a bit cryptic: - OutputVector -> - processAlgorithm has a new signature Use parameterAsSink instead of getOutputFromName 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