Re: [QGIS-Developer] run algorithm pyQgis 3

2020-02-12 Thread Cibeles Redondo Veloso
3.10 Windows 10
[image: image.png]

El mié., 12 feb. 2020 a las 10:55, Matteo Ghetta ()
escribió:

> > Dear Matteo,
> >
> > What version of QGIS are you running?
>
> 3.10 and 3.11 on a Debian Sid machine
>
> 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
___
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] run algorithm pyQgis 3

2020-02-12 Thread Matteo Ghetta
> Dear Matteo,
> 
> What version of QGIS are you running?

3.10 and 3.11 on a Debian Sid machine

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] run algorithm pyQgis 3

2020-02-12 Thread Cibeles Redondo Veloso
Dear Matteo,

What version of QGIS are you running?

El mié., 12 feb. 2020 a las 9:08, matteo ()
escribió:

> I get this:
>
> >>> processing.algorithmHelp('saga:triangulation')
> Triangulation (saga:triangulation)
>
>
> 
> Input parameters
> 
>
> SHAPES: Points
>
> Parameter type: QgsProcessingParameterFeatureSource
>
> Accepted data types:
> - str: layer ID
> - str: layer name
> - str: layer source
> - QgsProcessingFeatureSourceDefinition
> - QgsProperty
> - QgsVectorLayer
>
> .
>
> if you search for triangulation in the Processing toolbox do you find
> the algorithm of SAGA?
>
> 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] run algorithm pyQgis 3

2020-02-12 Thread matteo
I get this:

>>> processing.algorithmHelp('saga:triangulation')
Triangulation (saga:triangulation)



Input parameters


SHAPES: Points

Parameter type: QgsProcessingParameterFeatureSource

Accepted data types:
- str: layer ID
- str: layer name
- str: layer source
- QgsProcessingFeatureSourceDefinition
- QgsProperty
- QgsVectorLayer

.

if you search for triangulation in the Processing toolbox do you find
the algorithm of SAGA?

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] run algorithm pyQgis 3

2020-02-12 Thread Cibeles Redondo Veloso
Dear Matteo,

Thank you for your answer.

I using this code to check all the processing available with PyQGIS3

> for i in QgsApplication.processingRegistry().algorithms():
> print("{}:{} --> {}".format(i.provider().name(), i.name(),
> i.displayName()))


In the result there is no "saga:triangulation".

Also, I already try algorithmHelp('saga:triangulation')

[image: image.png]

There is no result.

That is the reason why I am writing here. I search for several days and I
do not find anything, also in StackOverflow and StackEchange.


Thank you in advance!







El mié., 12 feb. 2020 a las 7:34, matteo ()
escribió:

> Hi,
>
> > I am trying to convert a script from PyQGIS 2 to PyQGIS 3
> >
> > In the original script, the author used
> > processing.runalgorithm("saga:triangulation", parameters). Now, I am
> > trying to use it as same as possible with PyQGIS3 but I am not finding
> > anything similar:
> >
> >  1. I am using processing.run instead of processing.runalgorithm
> >  2. I am aware that there is no SAGA API for Python 3
> >  3.  The objective of the code is change as less as possible. That's why
> > I am not looking for other solutions (except if you tell me there is
> > no similar solution, of course)
> >
> > Maybe someone knows what can I do in this case?
>
> check which parameters have been specified: it might be a different
> number of them between QGIS2 and QGIS3.
>
> Type processing.algorithmHelp('saga:triangulation') to see the list and
> type of each single parameter.
>
> A complete guide of how to use algorithm from the console is n the user
> manual:
>
> https://docs.qgis.org/testing/en/docs/user_manual/processing/console.html
>
> 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
___
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] run algorithm pyQgis 3

2020-02-11 Thread matteo
Hi,

> I am trying to convert a script from PyQGIS 2 to PyQGIS 3
> 
> In the original script, the author used
> processing.runalgorithm("saga:triangulation", parameters). Now, I am
> trying to use it as same as possible with PyQGIS3 but I am not finding
> anything similar:
> 
>  1. I am using processing.run instead of processing.runalgorithm
>  2. I am aware that there is no SAGA API for Python 3
>  3.  The objective of the code is change as less as possible. That's why
> I am not looking for other solutions (except if you tell me there is
> no similar solution, of course)
> 
> Maybe someone knows what can I do in this case?

check which parameters have been specified: it might be a different
number of them between QGIS2 and QGIS3.

Type processing.algorithmHelp('saga:triangulation') to see the list and
type of each single parameter.

A complete guide of how to use algorithm from the console is n the user
manual:

https://docs.qgis.org/testing/en/docs/user_manual/processing/console.html

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

[QGIS-Developer] run algorithm pyQgis 3

2020-02-11 Thread Cibeles Redondo Veloso
Dear Qgis people,

I am trying to convert a script from PyQGIS 2 to PyQGIS 3

In the original script, the author used
processing.runalgorithm("saga:triangulation", parameters). Now, I am trying
to use it as same as possible with PyQGIS3 but I am not finding anything
similar:

   1. I am using processing.run instead of processing.runalgorithm
   2. I am aware that there is no SAGA API for Python 3
   3.  The objective of the code is change as less as possible. That's why
   I am not looking for other solutions (except if you tell me there is no
   similar solution, of course)

Maybe someone knows what can I do in this case?



Thank you all in advance for your time reading my problems!

Regards,
___
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