Hi Nyall,

this works like a charm! Here's what I needed it for: Create polygon center 
lines in QGIS [1]. My script for processing is still quite rough around the 
edges and everywhere else and needs some testing, but I am getting results, 
thanks to you!

Many thanks,
Frank


[1] GIT 
https://github.com/frankbroniewski/polygoncenterline/blob/master/PolygonCenterline.py

-----Ursprüngliche Nachricht-----
Von: Nyall Dawson <[email protected]> 
Gesendet: Dienstag, 3. Juli 2018 11:55
An: Frank Broniewski <[email protected]>
Cc: qgis-user <[email protected]>
Betreff: Re: [Qgis-user] QGIS 3 Processing question

> Nyall's tip with the temporary layer store just runs through nicely, but 
> nothing gets added to the layer pane after the script finished.

Sorry - missed something here. Because you're directly using the output from 
the child algorithm as your algorithm's final output, you should also pass the 
OUTPUT parameter value direct to the child algorithm. So in

>
>      def processAlgorithm(self, parameters, context, feedback):
>          # qgis:pointsalonglines
>          params = {
>              'INPUT': parameters[self.INPUT],
>              'DISTANCE': parameters[self.DISTANCE],
>              'START_OFFSET': 0,
>              'END_OFFSET': 0,
>              'OUTPUT': 'memory:'
>          }

 'OUTPUT': 'memory:'

should be

 'OUTPUT': parameters[self.OUTPUT]

Nyall

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to