Skip to content

Commit

Permalink
Fix typo and clarify instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and github-actions[bot] committed Apr 26, 2024
1 parent 3f625e1 commit 07fb477
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/training_manual/basic_map/mapviewnavigation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ the real world.

You can also use this field to set the Map Scale manually.

#. In the Status Bar, click on the :guilabel:`Scale` textfield.
#. In the Status Bar, click on the :guilabel:`Scale` text field.
#. Type in ``50000`` and press :kbd:`Enter`. This will redraw the features in the
Map Canvas to reflect the scale you typed in.
#. Alternatively, click on the options arrow of the :guilabel:`Scale` field to see
Expand All @@ -95,7 +95,7 @@ You can also use this field to set the Map Scale manually.
#. Select :guilabel:`1:5000`. This will also update the map scale in the Map Canvas.

Now you know the basics of navigating the Map Canvas. Check out the User Manual on
:ref:`Zooming and Panning<zoom_pan>` to learn about alternative ways of navigating
:ref:`Zooming and Panning <zoom_pan>` to learn about alternative ways of navigating
the Map Canvas.

In Conclusion
Expand Down
9 changes: 3 additions & 6 deletions docs/training_manual/databases/db_manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ databases using the QGIS DB Manager.
------------------------------------------------------------------------------------

You should first open the DB Manager interface by selecting
:guilabel:`Database --> DB Manager --> DB Manager` on the menu or by
selecting the DB Manager icon on the toolbar.

|dbManager|
:menuselection:`Database --> DB Manager --> DB Manager` on the menu
or by selecting the |dbManager| :sup:`DB Manager` icon on the toolbar.

You should already see the previous connections we have configured
and be able to expand the ``myPG`` section and its ``public`` schema
Expand All @@ -30,8 +28,7 @@ about the Schemas contained in your database.
:align: center

Schemas are a way of grouping data tables and other objects in a
PostgreSQL database and a container for permissions and other
constraints.
PostgreSQL database and a container for permissions and other constraints.
Managing PostgreSQL schemas is beyond the scope of this manual, but
you can find more information about them in the
`PostgreSQL documentation on Schemas
Expand Down
57 changes: 48 additions & 9 deletions docs/training_manual/processing/log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,65 @@ The processing log

.. note:: This lesson describes the processing log.

All the analysis performed with the processing framework is logged in QGIS logging system. This allows you to know more about what has been done with the processing tools, to solve problems when they happen, and also to re--run previous operations, since the logging system also implements some interactivity.
All the analysis performed with the processing framework is logged in QGIS logging system.
This allows you to know more about what has been done with the processing tools,
to solve problems when they happen, and also to re--run previous operations,
since the logging system also implements some interactivity.

To open the log, click on the balloon at the bottom right, on the QGIS status bar. Some algorithms might leave here information about their execution. For instance, those algorithms that call an external application usually log the console output of that application to this entry. If you have a look at it, you will see that the output of the SAGA algorithm that we just run (and that fail to execute because input data was not correct) is stored here.
To open the log, click on the balloon at the bottom right, on the QGIS status bar.
Some algorithms might leave here information about their execution.
For instance, those algorithms that call an external application
usually log the console output of that application to this entry.
If you have a look at it, you will see that the output of the SAGA algorithm that we just run
(and that fails to execute because input data was not correct) is stored here.

This is helpful to understand what is going on. Advanced users will be able to analyze that output to find out why the algorithm failed. If you are not an advanced user, this will be useful for others to help you diagnose the problem you are having, which might be a problem in the installation of the external software or an issue with the data you provided.
This is helpful to understand what is going on.
Advanced users will be able to analyze that output to find out why the algorithm failed.
If you are not an advanced user, this will be useful for others to help you diagnose the problem you are having,
which might be a problem in the installation of the external software or an issue with the data you provided.

Even if the algorithm could be executed, some algorithms might leave warnings in case the result might not be right. For instance, when executing an interpolation algorithm with a very small amount of points, the algorithm can run and will produce a result, but it is likely that it will not be correct, since more points should be used. It's a good idea to regularly check for this type of warnings if you are not sure about some aspect of a given algorithm.
Even if the algorithm could be executed, some algorithms might leave warnings in case the result might not be right.
For instance, when executing an interpolation algorithm with a very small amount of points,
the algorithm can run and will produce a result, but it is likely that it will not be correct, since more points should be used.
It's a good idea to regularly check for this type of warnings if you are not sure about some aspect of a given algorithm.

From the *Processing* menu, under the *History* section, you'll find *Algorithms*. All algorithms that are executed, even if they are executed from the GUI and not from the console (which will be explained later in this manual) are stored in this section as a console call. That means that everytime you run an algorithm, a console command is added to the log, and you have the full history of your working session. Here is how that history looks like:
From the :menuselection:`Processing --> History...` menu, you'll find *algorithms* that are executed,
regardless of they are executed from the GUI or from the console (which will be explained later in this manual).
The execution is stored in this dialog as a console call.
That means that everytime you run an algorithm, a console command is added to the log,
and you have the full history of your working session.
Here is how that history looks like:

.. figure:: img/log/history.png

This can be very useful when starting working with the console, to learn about the syntax of algorithms. We will use it when we discuss how to run analysis commands from the console.
This can be very useful when starting working with the console, to learn about the syntax of algorithms.
We will use it when we discuss how to run analysis commands from the console.

The history is also interactive, and you can re--run any previous algorithm just by double--clicking on its entry. This is an easy way of replicating the work we already did before.
:abbr:`★☆☆ (Basic level)` Follow Along
---------------------------------------

For instance, try the following. Open the data corresponding to the first chapter of this manual and run the algorithm explained there. Now go to the log dialog and locate the last algorithm in the list, which corresponds to the algorithm you have just run. Double--click on it an a new result should be produced, just like when you run it using the normal dialog and calling it from the toolbox.
The history is also interactive, and you can run any previous algorithm just by double-clicking on its entry.
This is an easy way of replicating the work we already did before.

For instance, try the following:

#. Open the data corresponding to the first chapter of this manual and run the algorithm explained there.
#. Now go to the log dialog and locate the last algorithm in the list, which corresponds to the algorithm you have just run.
#. Double-click on it and a new result should be produced, just like when you run it using the normal dialog and calling it from the toolbox.

:abbr:`★★★ (Advanced level)` Advanced
-------------------------------------

You can also modify the algorithm.

#. Copy the algorithm call
#. Open the :menuselection:`Plugins --> Python console`
#. Paste your copy to run the analysis; change the text at will.
#. To display the resulting file, type::

iface.addVectorLayer('/path/filename.shp', 'Layer name in legend', 'ogr')

Otherwise, you can use::

You can also modify the algorithm. Just copy it, open the :menuselection:`Plugins --> Python console`, click on :menuselection:`Import class --> Import Processing class`, then paste it to re-run the analysis; change the text at will. To display the resulting file, type :kbd:`iface.addVectorLayer('/path/filename.shp', 'Layer name in legend', 'ogr')`. Otherwise, you can use :kbd:`processing.runandload`.
processing.runAndloadResults

0 comments on commit 07fb477

Please sign in to comment.