scripts for chaining processes
Is it possible to write a script that would do the processing of eg. a classification workflow?
If yes, could anybody write, as an example, the script corresponding to the use case example of the Classification Workflow Application of the Getting Started section?
(BTW, that example should be adapted to 3.7)
Comments (11)
-
-
-
assigned issue to
-
assigned issue to
-
@ Andreas Rabe Don’t we have this in the API Doc somewhere?
Using the API from python is IMO not a suited example for the Getting Started in the User Section.
-
Just to mention: another option to chain processes without using the python API directly is to use the model builder. Those models can also be saved in a model file or python script.
https://enmap-box.readthedocs.io/en/latest/usr_section/usr_cookbook/graphical_modeler.html (Although I didn’t test this recipe with current versions of QGIS and the EnMAP-Box, things might have changed, but it should still work more or less)
-
Using the API from python is IMO not a suited example for the Getting Started in the User Section.
@Fabian Thiel sorry, with “can you adopt the Getting Starting docs”, I related to the new “Training Input” widget and not to the script. Does that make sense?
-
@ Andreas Rabe Don’t we have this in the API Doc somewhere?
@Fabian Thiel yes, kind of what’s requested.
@Agustin Lobo is that sufficient or do you need further input?
-
@Andreas Janz Got it, you are right, this is important. Added to my Trello
-
reporter - changed title to scripts for chaining processes
-
reporter @Agustin Lobo
is that sufficient or do you need further input?
Very much. Two remarks:
- I missed this doc because it is within the Devs section. I think it should me moved within the users section, scripting is just another way of using EnMapBox, not a way of developping new features.
- I see a problem for actually figuring out which are the appropriate functions when I’ll try to write an script from scratch. For example, how to know that I must use
classifier.predict
() in order to make a prediction? This is not trivial. A useful aid would be automatically geting the script for a any task generated with the gui. That would be a very good way of geting started with scripting. The same for the Graphical Modeler: geting the script for the model would be helpful. And of course, a (remote) introductory workshop to scripting with EnMapBox would be great. - I understand the Graphical Modeler can be an alternative to scripting, but I’ve always felt that such kind of tools required investing too long a time and went directely to scripting.
-
@Agustin Lobo
I missed this doc because it is within the Devs section. I think it should me moved within the users section, scripting is just another way of using EnMapBox, not a way of developping new features.
You are right, using the API in a script is not the same as developing the EnMAP-Box. We will discuss this in the next meeting.
I see a problem for actually figuring out which are the appropriate functions when I’ll try to write an script from scratch. For example, how to know that I must use
classifier.predict
() in order to make a prediction? This is not trivial. A useful aid would be automatically geting the script for a any task generated with the gui. That would be a very good way of geting started with scripting. The same for the Graphical Modeler: geting the script for the model would be helpful. And of course, a (remote) introductory workshop to scripting with EnMapBox would be great.We find it quit challenging to communicate the API functionality to the users. Our current strategy is to prepare usage examples (https://enmap-box.readthedocs.io/en/latest/dev_section/dev_cookbook/hubflow/usage/core.html) and hope that this is good enough. What we are usually do, is to add a new example, if a user asks for it.
So, if you need a specific code snippet, we will try to prepare it for you and update the docs.
I understand the Graphical Modeler can be an alternative to scripting, but I’ve always felt that such kind of tools required investing too long a time and went directely to scripting.
I totally agree on that
-
- changed status to closed
- Log in to comment
Yes, it’s possible. I can prepare a script.
@Fabian Thiel can you adopt the Getting Starting docs.