[QGIS-Developer] free variable 'self' referenced before assignment in enclosing scope

2019-01-30 Thread Bjørn Burr Nyberg
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

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

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

 


test2.py
Description: test2.py
___
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 [629] Networks approval notification.

2019-01-30 Thread noreply

Plugin Networks approval by pcav.
The plugin version "[629] Networks 2.2.4" is now approved
Link: http://plugins.qgis.org/plugins/networks/
___
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] Dijkstra not getting the correct results

2019-01-30 Thread Christoph Dohm
Hi,

 

I'm trying to work on a routing problem for my Python plugin and I wanted to use the Dijksta algorithm for that. I used QGIS 3.0 Girona first, but upgraded to 3.4 Madeira recently but getting the same result.

 

I tried to work along the Code from the Cookbook and also used the book "Building Mapping Applications with QGIS" from Erik Westra, which is basically the same Code as in the Cookbook.

 

Since those sources are from QGIS 2 I had to make some adaptions (import from qgis.analysis library instead qgis.networkanalysis and some others) My Code seems to be working now, but the results aren't usful as it no matter what I do only gives me a -1 for every vertex in the tree.

 

I posted my problem on stackexchange with the Code that I'm using.

 

https://gis.stackexchange.com/questions/308244/dijkstra-finding-shortest-path-gives-back-a-tree-with-only-1-in-it

 

I'm a little lost. I don't understand why it is not working.

 

Sincerely

 

Chris

 

 

 

 

Here is a part of the Code I'm using

 


director = QgsVectorLayerDirector(layer, -1, '', '', '', 3) 

strategy = QgsNetworkDistanceStrategy()

director.addStrategy(strategy)

builder = QgsGraphBuilder(crs) #crs = project.crs() which is in this case WGS84

tiedPoints = director.makeGraph(builder, [startPt, endPt])
graph = builder.graph()   

startVertex = graph.findVertex(startPt)

(tree, cost) = QgsGraphAnalyzer.dijkstra(graph, startVertex,0)

 

 

 

___
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] plugin globe with QGIS 3

2019-01-30 Thread Saber Razmjooei
Hi Alain,

We are in process of adding the features to QGIS gradually. Unfortunately,
it is not possible to add all of the features all in one go, as 3D was
completely done from scratch in QGIS 3.
There will be some new features from the crowd-funding in 3.6. But globe is
likely to be included in 3.8.

Feel free to contact us if you have any questions.

Kind regards
Saber


On Wed, 30 Jan 2019 at 08:31, FERRATON Alain (Chef de groupe) -
SG/SPSSI/CPII/DOO/ET  wrote:

> Hi ,
> the globe plugin has not been ported to QGIS 3
> ticket #15536 does not seem to have had any continuation to date.
> according to https://www.lutraconsulting.co.uk/crowdfunding/more-qgis-3d/
> a globe functionality should be developed in QGIS 3 (earth as a globe).
> what is the roadmap today to have this functionality that interests us
> for the use of fishing fleet management?
>
> Regards,
> Alain
>
> --
>
> FERRATON Alain
> Ministère de la Transition écologique et solidaire (MTES)
> SG/SPSSI/CPII/DOO
> Chef du groupe Expertise Technique
> 02.40.12.84.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



-- 
Saber Razmjooei
www.lutraconsulting.co.uk
+44 (0)7568 129733
___
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] plugin globe with QGIS 3

2019-01-30 Thread João Gaspar
Hi Alain,
i don't know if this answer to your question but in QGIS 3.4 you have a 3D
Map View.
Go to View > New 3D Map View.

Please check this link:
https://www.lutraconsulting.co.uk/blog/2018/03/01/working-with-qgis-3d-part-1/


The coolest part is the option to integrate this 3D view in layout composer.

Cheers,
João



FERRATON Alain (Chef de groupe) - SG/SPSSI/CPII/DOO/ET <
alain.ferra...@developpement-durable.gouv.fr> escreveu no dia quarta,
30/01/2019 à(s) 08:31:

> Hi ,
> the globe plugin has not been ported to QGIS 3
> ticket #15536 does not seem to have had any continuation to date.
> according to https://www.lutraconsulting.co.uk/crowdfunding/more-qgis-3d/
> a globe functionality should be developed in QGIS 3 (earth as a globe).
> what is the roadmap today to have this functionality that interests us
> for the use of fishing fleet management?
>
> Regards,
> Alain
>
> --
>
> FERRATON Alain
> Ministère de la Transition écologique et solidaire (MTES)
> SG/SPSSI/CPII/DOO
> Chef du groupe Expertise Technique
> 02.40.12.84.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

[QGIS-Developer] plugin globe with QGIS 3

2019-01-30 Thread Chef de groupe

Hi ,
the globe plugin has not been ported to QGIS 3
ticket #15536 does not seem to have had any continuation to date.
according to https://www.lutraconsulting.co.uk/crowdfunding/more-qgis-3d/
a globe functionality should be developed in QGIS 3 (earth as a globe).
what is the roadmap today to have this functionality that interests us 
for the use of fishing fleet management?


Regards,
Alain

--

FERRATON Alain
Ministère de la Transition écologique et solidaire (MTES)
SG/SPSSI/CPII/DOO
Chef du groupe Expertise Technique
02.40.12.84.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