Re: [QGIS-Developer] Find unmaintained plugins

2019-02-01 Thread Paolo Cavallini
Thanks for your offer of help. I agree that the mail should be sent only
for plugins not updated in the last (3? 6? 9?) months.
Could you please start filling up a ticket on
https://issues.qgis.org/issues
so we can define specs resulting from this thread and start implementing it?
Cheers.

On 01/02/19 22:40, Thomas Baumann wrote:
> Hi Paolo,
> 
> sounds like a good idea to send a reminder once a year to the maintainer
> and mark plugins as unmaintained if no feedback is received.
> 
> I am available to help implementing it.
> 
> Regards,
> Thomas
> 
> 
> Am Fr., 1. Feb. 2019, 19:01 hat Paolo Cavallini  > geschrieben:
> 
> Hi Thomas,
> 
> On 01/02/19 13:53, Thomas Baumann wrote:
> 
> > I made the experience that there are QGIS-plugins which are not
> > maintained anymore.
> > Example:
> >
> 
> http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-Rectangles-Ovals-Digitizing-plugin-deprecated-td5366686.html
> >
> > Recently I asked some maintainers if they have plans to update their
> > plugins to be QGIS3-ready because I was willing to update them if the
> > maintainer wouldn't do it... but again I got the impression that some
> > plugins are not maintained anymore.
> > Example:
> > https://github.com/NathanW2/selection-sets/issues/5
> >
> > Now that there is the change from QGIS2 to QGIS3 some unmaintained
> > plugins will just dissapear like through a "natural selection". But in
> > one or two years there could again be lots of unmaintained plugins
> which
> > could have bugs that slow down qgis or make them unstable like it
> > happened with the Rectangles-Ovals-Digitizing-plugin (
> > https://github.com/vinayan/RectOvalDigitPlugin/issues/6 ).
> >
> > Wouldn't it make sense to check once a year if all plugins are still
> > maintained?
> >
> > You could for example use something like LimeSurvey (
> > https://www.limesurvey.org/community ) and ask every maintainer to
> > respond if they still feel responsible for the plugin. In the
> backend of
> > Limesurvey you have a database with the responses so it should be
> quite
> > easy to automatically synchronize the results with your
> repository-items.
> > This way the unmaintained plugins could be marked as deprecated if no
> > response is sent back.
> 
> thanks a lot for your suggestion. I agree that the move to QGIS 3
> automatically purges old unmaintained code, but this does not solve
> entirely the issue.
> In short do you suggest we should run a survey once a year, sending it
> to the list of plugin maintainers, and marking as deprecated all plugins
> for which we do not receive a positive response?
> I would be a bit skeptical, as many plugins are still useful even if not
> actively maintained. An alternative would be to add to our Django app an
> automatic reminder to be sent to maintainer, asking to confirm they
> maintenance; in absence of a feedback, we could mark it as unmaintained,
> and make this visible to users, so they have the options of adopting it,
> supporting it, or stopping using it before it actually stops working.
> How does it sound? in case you agree on this or a modified version of
> it, would you be available to help implementing this?
> All the best.
> -- 
> Paolo Cavallini - www.faunalia.eu 
> QGIS.ORG  Chair:
> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
> ___
> 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
> 

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
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] Find unmaintained plugins

2019-02-01 Thread Thomas Baumann
Hi Calvin,
I have opened issues on GitHub for several plugins or sent pullrequest with
no reaction at all what's pretty frustrating.
I don't think that it's a good idea to wait several years until it's clear
that a plugin is not maintained anymore.
Answering one email per year (and plugin) doesn't seem to be too much
effort to me.

Regards,
Thomas


Am Fr., 1. Feb. 2019, 22:47 hat C Hamilton 
geschrieben:

> I would only send a reminder to the maintainer if there has not been a
> recent update and for some plugins they may not need to be updated for
> several years - with the exception of a major release i.e. 2 to 3.
>
> Regards,
> Calvin
>
> On Fri, Feb 1, 2019 at 4:41 PM Thomas Baumann 
> wrote:
>
>> Hi Paolo,
>>
>> sounds like a good idea to send a reminder once a year to the maintainer
>> and mark plugins as unmaintained if no feedback is received.
>>
>> I am available to help implementing it.
>>
>> Regards,
>> Thomas
>>
>
___
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] Find unmaintained plugins

2019-02-01 Thread C Hamilton
I would only send a reminder to the maintainer if there has not been a
recent update and for some plugins they may not need to be updated for
several years - with the exception of a major release i.e. 2 to 3.

Regards,
Calvin

On Fri, Feb 1, 2019 at 4:41 PM Thomas Baumann 
wrote:

> Hi Paolo,
>
> sounds like a good idea to send a reminder once a year to the maintainer
> and mark plugins as unmaintained if no feedback is received.
>
> I am available to help implementing it.
>
> Regards,
> Thomas
>
___
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] Find unmaintained plugins

2019-02-01 Thread Thomas Baumann
Hi Paolo,

sounds like a good idea to send a reminder once a year to the maintainer
and mark plugins as unmaintained if no feedback is received.

I am available to help implementing it.

Regards,
Thomas


Am Fr., 1. Feb. 2019, 19:01 hat Paolo Cavallini 
geschrieben:

> Hi Thomas,
>
> On 01/02/19 13:53, Thomas Baumann wrote:
>
> > I made the experience that there are QGIS-plugins which are not
> > maintained anymore.
> > Example:
> >
> http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-Rectangles-Ovals-Digitizing-plugin-deprecated-td5366686.html
> >
> > Recently I asked some maintainers if they have plans to update their
> > plugins to be QGIS3-ready because I was willing to update them if the
> > maintainer wouldn't do it... but again I got the impression that some
> > plugins are not maintained anymore.
> > Example:
> > https://github.com/NathanW2/selection-sets/issues/5
> >
> > Now that there is the change from QGIS2 to QGIS3 some unmaintained
> > plugins will just dissapear like through a "natural selection". But in
> > one or two years there could again be lots of unmaintained plugins which
> > could have bugs that slow down qgis or make them unstable like it
> > happened with the Rectangles-Ovals-Digitizing-plugin (
> > https://github.com/vinayan/RectOvalDigitPlugin/issues/6 ).
> >
> > Wouldn't it make sense to check once a year if all plugins are still
> > maintained?
> >
> > You could for example use something like LimeSurvey (
> > https://www.limesurvey.org/community ) and ask every maintainer to
> > respond if they still feel responsible for the plugin. In the backend of
> > Limesurvey you have a database with the responses so it should be quite
> > easy to automatically synchronize the results with your repository-items.
> > This way the unmaintained plugins could be marked as deprecated if no
> > response is sent back.
>
> thanks a lot for your suggestion. I agree that the move to QGIS 3
> automatically purges old unmaintained code, but this does not solve
> entirely the issue.
> In short do you suggest we should run a survey once a year, sending it
> to the list of plugin maintainers, and marking as deprecated all plugins
> for which we do not receive a positive response?
> I would be a bit skeptical, as many plugins are still useful even if not
> actively maintained. An alternative would be to add to our Django app an
> automatic reminder to be sent to maintainer, asking to confirm they
> maintenance; in absence of a feedback, we could mark it as unmaintained,
> and make this visible to users, so they have the options of adopting it,
> supporting it, or stopping using it before it actually stops working.
> How does it sound? in case you agree on this or a modified version of
> it, would you be available to help implementing this?
> All the best.
> --
> Paolo Cavallini - www.faunalia.eu
> QGIS.ORG Chair:
> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
> ___
> 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] proj6 to be and QGIS...

2019-02-01 Thread Richard Duivenvoorde
Hi Devs,

Seeing this tweet:

https://twitter.com/EvenRouault/status/1091067967763288066

pointing to

https://erouault.blogspot.com/2019/01/srs-barn-raising-8th-report-ready-for.html

With the help of Even I've been able to compile proj+gdal master (to
become proj6). If you want to compile and use it next to the proj/gdal
from your distro (Debian testing here) you maybe need some extra tips,
which Even jotted down here:

https://trac.osgeo.org/gdal/wiki/BuildingOnUnixGDAL25dev

So now "we" can start to make this work with QGIS :-)

[354/4155] Building CXX object
src/core/CMakeF...is_core.dir/qgscoordinatereferencesystem.cpp.o
FAILED:
src/core/CMakeFiles/qgis_core.dir/qgscoordinatereferencesystem.cpp.o
ccache /usr/bin/c++  -DQT_CONCURRENT_LIB -DQT_CORE_LIB
-DQT_DISABLE_DEPRECATED_BEFORE=0 -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_NO_CAST_TO_ASCII -DQT_POSITIONING_LIB -DQT_PRINTSUPPORT_LIB
-DQT_SERIALPORT_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_WEBKITWIDGETS_LIB
-DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB
-DTEST_DATA_DIR=\"/home/richard/git/qgisgdal/tests/testdata\"
-DWITH_BINDINGS -DWITH_QTWEBKIT -D_HAVE_PTHREAD_ -Dqgis_core_EXPORTS -I.
-I../src/core -Isrc/core -I../src/core/3d -I../src/core/annotations
-I../src/core/auth -I../src/core/dxf -I../src/core/effects
-I../src/core/expression -I../src/core/fieldformatter
-I../src/core/geometry -I../src/core/geocms -I../src/core/geocms/geonode
-I../src/core/layertree -I../src/core/layout -I../src/core/locator
-I../src/core/metadata -I../src/core/pal -I../src/core/processing
-I../src/core/processing/models -I../src/core/providers
-I../src/core/providers/memory -I../src/core/raster
-I../src/core/renderer -I../src/core/scalebar -I../src/core/symbology
-I../src/core/mesh -I../src/core/validity -I../external/kdbush/include
-I../external/nmea -I../external/poly2tri -isystem
/home/richard/bin/proj/include -isystem /home/richard/bin/gdal/include
-isystem /usr/include/QtCrypto -isystem /usr/include/qt5keychain
-isystem /usr/include/x86_64-linux-gnu/qt5 -isystem
/usr/include/x86_64-linux-gnu/qt5/QtSerialPort -isystem
/usr/include/x86_64-linux-gnu/qt5/QtCore -isystem
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem
/usr/include/x86_64-linux-gnu/qt5/QtXml -isystem
/usr/include/x86_64-linux-gnu/qt5/QtGui -isystem
/usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem
/usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem
/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -isystem
/usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem
/usr/include/x86_64-linux-gnu/qt5/QtWebKitWidgets -isystem
/usr/include/x86_64-linux-gnu/qt5/QtWebKit -isystem
/usr/include/x86_64-linux-gnu/qt5/QtSql -isystem
/usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem
/usr/include/x86_64-linux-gnu/qt5/QtPositioning -Wall -Wextra
-Wno-long-long -Wformat-security -Wno-strict-aliasing -g -fPIC
-fvisibility=hidden   -fPIC -std=gnu++11 -MD -MT
src/core/CMakeFiles/qgis_core.dir/qgscoordinatereferencesystem.cpp.o -MF
src/core/CMakeFiles/qgis_core.dir/qgscoordinatereferencesystem.cpp.o.d
-o src/core/CMakeFiles/qgis_core.dir/qgscoordinatereferencesystem.cpp.o
-c ../src/core/qgscoordinatereferencesystem.cpp
../src/core/qgscoordinatereferencesystem.cpp: In member function ‘bool
QgsCoordinateReferenceSystem::createFromWkt(const QString&)’:
../src/core/qgscoordinatereferencesystem.cpp:642:5: error: ‘OSRFixup’
was not declared in this scope
 OSRFixup( d->mCRS );
 ^~~~
../src/core/qgscoordinatereferencesystem.cpp:642:5: note: suggested
alternative: ‘OGRField’
 OSRFixup( d->mCRS );
 ^~~~
 OGRField
../src/core/qgscoordinatereferencesystem.cpp: In member function ‘void
QgsCoordinateReferenceSystem::setMapUnits()’:
../src/core/qgscoordinatereferencesystem.cpp:1181:3: error: ‘OSRFixup’
was not declared in this scope
   OSRFixup( d->mCRS );
   ^~~~
../src/core/qgscoordinatereferencesystem.cpp:1181:3: note: suggested
alternative: ‘OGRField’
   OSRFixup( d->mCRS );
   ^~~~
   OGRField
[363/4155] Building CXX object
src/core/CMakeFiles/qgis_core.dir/qgsdataitem.cpp.o
___
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 [332] geoUmbriaSUIT approval notification.

2019-02-01 Thread noreply

Plugin geoUmbriaSUIT approval by pcav.
The plugin version "[332] geoUmbriaSUIT 3.0.2 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/geoUmbriaSUIT/
___
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] Find unmaintained plugins

2019-02-01 Thread Paolo Cavallini
Hi Thomas,

On 01/02/19 13:53, Thomas Baumann wrote:

> I made the experience that there are QGIS-plugins which are not
> maintained anymore.
> Example:
> http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-Rectangles-Ovals-Digitizing-plugin-deprecated-td5366686.html
> 
> Recently I asked some maintainers if they have plans to update their
> plugins to be QGIS3-ready because I was willing to update them if the
> maintainer wouldn't do it... but again I got the impression that some
> plugins are not maintained anymore.
> Example:
> https://github.com/NathanW2/selection-sets/issues/5
> 
> Now that there is the change from QGIS2 to QGIS3 some unmaintained
> plugins will just dissapear like through a "natural selection". But in
> one or two years there could again be lots of unmaintained plugins which
> could have bugs that slow down qgis or make them unstable like it
> happened with the Rectangles-Ovals-Digitizing-plugin (
> https://github.com/vinayan/RectOvalDigitPlugin/issues/6 ).
> 
> Wouldn't it make sense to check once a year if all plugins are still
> maintained?
> 
> You could for example use something like LimeSurvey (
> https://www.limesurvey.org/community ) and ask every maintainer to
> respond if they still feel responsible for the plugin. In the backend of
> Limesurvey you have a database with the responses so it should be quite
> easy to automatically synchronize the results with your repository-items.
> This way the unmaintained plugins could be marked as deprecated if no
> response is sent back.

thanks a lot for your suggestion. I agree that the move to QGIS 3
automatically purges old unmaintained code, but this does not solve
entirely the issue.
In short do you suggest we should run a survey once a year, sending it
to the list of plugin maintainers, and marking as deprecated all plugins
for which we do not receive a positive response?
I would be a bit skeptical, as many plugins are still useful even if not
actively maintained. An alternative would be to add to our Django app an
automatic reminder to be sent to maintainer, asking to confirm they
maintenance; in absence of a feedback, we could mark it as unmaintained,
and make this visible to users, so they have the options of adopting it,
supporting it, or stopping using it before it actually stops working.
How does it sound? in case you agree on this or a modified version of
it, would you be available to help implementing this?
All the best.
-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
___
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 [1066] Isogeo approval notification.

2019-02-01 Thread noreply

Plugin Isogeo approval by pcav.
The plugin version "[1066] Isogeo 1.6.3" is now approved
Link: http://plugins.qgis.org/plugins/isogeo_search_engine/
___
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] support for SpatiaLite >= 4.5

2019-02-01 Thread Jürgen E . Fischer
Hi Totò,

On Fri, 01. Feb 2019 at 06:58:40 -0700, Totò wrote:
> QGIS currently has a spatialite support of 4.3 where some very important
> modules like virtualKNN [0] are missing. There are post here [1] and here
> [2].
> This message as feature request, to enable SpatiaLite >= 4.5, I think this
> enable very important features.

Not sure what the latest released version is.  From the home[0] and download
page it looks like it's 4.3.0a - for the others there are only RCs or betas.


Jürgen


[0] https://www.gaia-gis.it/fossil/libspatialite/wiki?name=SpatiaLite
[1] http://www.gaia-gis.it/gaia-sins/libspatialite-sources/?C=M;O=D

-- 
Jürgen E. Fischer   norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13  Fax. +49-4931-918175-50
Software Engineer   D-26506 Nordenhttps://www.norbit.de
QGIS release manager (PSC)  GermanyIRC: jef on FreeNode


signature.asc
Description: PGP signature
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Juergen Fischer, Nils Kutscher HR: Amtsgericht Aurich HRB 100827
Datenschutzerklaerung: https://www.norbit.de/83/
___
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 [983] DIVI QGIS Plugin approval notification.

2019-02-01 Thread noreply

Plugin DIVI QGIS Plugin approval by pcav.
The plugin version "[983] DIVI QGIS Plugin 2.0" is now approved
Link: http://plugins.qgis.org/plugins/DiviPlugin/
___
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] support for SpatiaLite >= 4.5

2019-02-01 Thread Totò
Hello everyone,
QGIS currently has a spatialite support of 4.3 where some very important
modules like virtualKNN [0] are missing. There are post here [1] and here
[2].
This message as feature request, to enable SpatiaLite >= 4.5, I think this
enable very important features.

--
[0] https://www.gaia-gis.it/fossil/libspatialite/wiki?name=KNN
[1] https://issues.qgis.org/issues/17742#change-99448
[2]
https://gis.stackexchange.com/questions/269517/spatialite-knn-view-in-qgis

thanks for your attention and good work

Salvatore Fiandaca



-
https://pigrecoinfinito.wordpress.com/
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
___
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] Find unmaintained plugins

2019-02-01 Thread Thomas Baumann
Hello qgis-devs,

I made the experience that there are QGIS-plugins which are not maintained
anymore.
Example:
http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-Rectangles-Ovals-Digitizing-plugin-deprecated-td5366686.html

Recently I asked some maintainers if they have plans to update their
plugins to be QGIS3-ready because I was willing to update them if the
maintainer wouldn't do it... but again I got the impression that some
plugins are not maintained anymore.
Example:
https://github.com/NathanW2/selection-sets/issues/5

Now that there is the change from QGIS2 to QGIS3 some unmaintained plugins
will just dissapear like through a "natural selection". But in one or two
years there could again be lots of unmaintained plugins which could have
bugs that slow down qgis or make them unstable like it happened with the
Rectangles-Ovals-Digitizing-plugin (
https://github.com/vinayan/RectOvalDigitPlugin/issues/6 ).

Wouldn't it make sense to check once a year if all plugins are still
maintained?

You could for example use something like LimeSurvey (
https://www.limesurvey.org/community ) and ask every maintainer to respond
if they still feel responsible for the plugin. In the backend of Limesurvey
you have a database with the responses so it should be quite easy to
automatically synchronize the results with your repository-items.
This way the unmaintained plugins could be marked as deprecated if no
response is sent back.

Just my two cents...

regards,
Thomas
___
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 [1616] Hqgis approval notification.

2019-02-01 Thread noreply

Plugin Hqgis approval by pcav.
The plugin version "[1616] Hqgis 0.3.3 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/Hqgis/
___
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] free variable 'self' referenced before assignment in enclosing scope

2019-02-01 Thread Bjørn Burr Nyberg
Hi Nyall,

Thank you for your time! I really appreciate it and will definitely implement 
those suggestions as well.

I am using QGIS 3.4 however the bug seems to be resolved with the your 
suggestions and if I save the script to the processing toolbox rather than run 
it from the editor. 

Kind regards,
Bjorn

-Original Message-
From: Nyall Dawson  
Sent: Friday, February 01, 2019 12:21 AM
To: Bjørn Burr Nyberg 
Cc: qgis-developer@lists.osgeo.org
Subject: Re: [QGIS-Developer] free variable 'self' referenced before assignment 
in enclosing scope

On Thu, 31 Jan 2019 at 02:46, Bjørn Burr Nyberg  wrote:
>
> Dear QGIS community,
>
> In the spirit of open-source I am trying to convert a set of scripts that ive 
> designed in ArcMap to QGIS 3.x. I hope that this will enable a broader 
> community of individuals to use the workflows ive designed. The original 
> scripts can be found at 
> https://github.com/BjornNyberg/NetworkGT/tree/master/Scripts

Great!

> My problem is that in my first attempt to convert the scripts, QGIS either 
> crashes or gives the following error.
>
> 2019-01-30T16:51:27 WARNINGTraceback (most recent call last):
>   File 
> "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py",
>  line 238, in on_complete
>   self.feedback.pushInfo(self.tr('Execution completed in {0:0.2f} 
> seconds').format(time.time() - start_time))
>  NameError: free variable 'self' referenced before assignment in 
> enclosing scope
>

This was a bug fixed already - are you on QGIS 3.4?

Anyone, the problem stems from this line:

templines = st.run('native:splitwithlines',parameters)

This should be:

templines =
st.run('native:splitwithlines',parameters,context=context,
feedback=feedback)

I.e. you need to pass the child algorithm the context and feedback
objects given to your algorithm, to allow that child algorithm to push
feedback messages and access existing map layers.


Two other suggestions:

except Exception as e:

feedback.pushInfo(QCoreApplication.translate('Sample_Area','%s'%(e)))

Here this would be better as:

except Exception as e:

feedback.reportError(QCoreApplication.translate('Sample_Area','%s'%(e)))

(reportError instead of pushInfo)

And

for part in geom: #Check for multipart polyline
parts.append(QgsGeometry.fromPolyline(part)) #intersected geometry

This should be

for part in geom.asGeometryCollection(): #Check for multipart polyline
parts.append(QgsGeometry.fromPolyline(part)) #intersected geometry

(or, nicer for 3.4):

for part in geom.parts(): #Check for multipart polyline
parts.append(QgsGeometry.fromPolyline(part)) #intersected geometry


Hope that helps!
Nyall






> I have established that this error occurs at the very end of the script when 
> calling ' return {self.Branches:dest_id,self.Nodes:dest_id2}'. I do not 
> believe that I have explicitly defined self  anywhere in the processAlgorithm 
> function itself. The algorithms themselves work as intended and the 
> shapefiles are created before the program crashes.
>
> I am not a programmer by trait so I'm not entirely sure how to problem solve 
> this error and any help would be most appreciated. I can also provide a test 
> dataset if that is helpful.
>
> Cheers,
> Bjorn
> -
> Postdoctoral Fellow
> Department of Earth Science, University of Bergen
> PO Box 7803, 5020, Bergen, Norway
> +47 485 024 08
>
>
> ___
> 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] free variable 'self' referenced before assignment in enclosing scope

2019-02-01 Thread Nyall Dawson
On Fri, 1 Feb 2019 at 19:18, Bjørn Burr Nyberg  wrote:
>
> Hi Nyall,
>
> Thank you for your time! I really appreciate it and will definitely implement 
> those suggestions as well.
>
> I am using QGIS 3.4 however the bug seems to be resolved with the your 
> suggestions and if I save the script to the processing toolbox rather than 
> run it from the editor.
>

Is it 3.4.4?

Nyall

> Kind regards,
> Bjorn
>
> -Original Message-
> From: Nyall Dawson 
> Sent: Friday, February 01, 2019 12:21 AM
> To: Bjørn Burr Nyberg 
> Cc: qgis-developer@lists.osgeo.org
> Subject: Re: [QGIS-Developer] free variable 'self' referenced before 
> assignment in enclosing scope
>
> On Thu, 31 Jan 2019 at 02:46, Bjørn Burr Nyberg  wrote:
> >
> > Dear QGIS community,
> >
> > In the spirit of open-source I am trying to convert a set of scripts that 
> > ive designed in ArcMap to QGIS 3.x. I hope that this will enable a broader 
> > community of individuals to use the workflows ive designed. The original 
> > scripts can be found at 
> > https://github.com/BjornNyberg/NetworkGT/tree/master/Scripts
>
> Great!
>
> > My problem is that in my first attempt to convert the scripts, QGIS either 
> > crashes or gives the following error.
> >
> > 2019-01-30T16:51:27 WARNINGTraceback (most recent call last):
> >   File 
> > "C:/PROGRA~1/QGIS3~1.4/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py",
> >  line 238, in on_complete
> >   self.feedback.pushInfo(self.tr('Execution completed in 
> > {0:0.2f} seconds').format(time.time() - start_time))
> >  NameError: free variable 'self' referenced before assignment 
> > in enclosing scope
> >
>
> This was a bug fixed already - are you on QGIS 3.4?
>
> Anyone, the problem stems from this line:
>
> templines = st.run('native:splitwithlines',parameters)
>
> This should be:
>
> templines =
> st.run('native:splitwithlines',parameters,context=context,
> feedback=feedback)
>
> I.e. you need to pass the child algorithm the context and feedback
> objects given to your algorithm, to allow that child algorithm to push
> feedback messages and access existing map layers.
>
>
> Two other suggestions:
>
> except Exception as e:
>
> feedback.pushInfo(QCoreApplication.translate('Sample_Area','%s'%(e)))
>
> Here this would be better as:
>
> except Exception as e:
>
> feedback.reportError(QCoreApplication.translate('Sample_Area','%s'%(e)))
>
> (reportError instead of pushInfo)
>
> And
>
> for part in geom: #Check for multipart polyline
> parts.append(QgsGeometry.fromPolyline(part)) #intersected geometry
>
> This should be
>
> for part in geom.asGeometryCollection(): #Check for multipart polyline
> parts.append(QgsGeometry.fromPolyline(part)) #intersected geometry
>
> (or, nicer for 3.4):
>
> for part in geom.parts(): #Check for multipart polyline
> parts.append(QgsGeometry.fromPolyline(part)) #intersected geometry
>
>
> Hope that helps!
> Nyall
>
>
>
>
>
>
> > I have established that this error occurs at the very end of the script 
> > when calling ' return {self.Branches:dest_id,self.Nodes:dest_id2}'. I do 
> > not believe that I have explicitly defined self  anywhere in the 
> > processAlgorithm function itself. The algorithms themselves work as 
> > intended and the shapefiles are created before the program crashes.
> >
> > I am not a programmer by trait so I'm not entirely sure how to problem 
> > solve this error and any help would be most appreciated. I can also provide 
> > a test dataset if that is helpful.
> >
> > Cheers,
> > Bjorn
> > -
> > Postdoctoral Fellow
> > Department of Earth Science, University of Bergen
> > PO Box 7803, 5020, Bergen, Norway
> > +47 485 024 08
> >
> >
> > ___
> > 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] [FEATURE EXCEPTION] Export SLD 1.0 for Rasters. Merge exception request for QGIS 3.6

2019-02-01 Thread Luigi Pirelli
ecactly

Luigi Pirelli

**
* 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
* Hire me: http://goo.gl/BYRQKg
**


On Thu, 31 Jan 2019 at 23:41, Nyall Dawson  wrote:

> On Fri, 1 Feb 2019 at 08:02, Luigi Pirelli  wrote:
> >
> > sorry my mistake... the request is to backport
>
> So you want to include in both 3.6 and then backport to 3.4?
>
> I'm a +0 here. The code only touches SLD export, so I think it's low
> risk outside of this area.
>
> 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