Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 [Documentation] Reorganize sections in doc #4424

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
aafea83
Bump redis from 5.2.0 to 5.2.1
dependabot[bot] Dec 16, 2024
2da88e1
delete sections of doc
bruhnild Dec 18, 2024
ef9e691
Create new section for importing data and reorganize doc
bruhnild Dec 18, 2024
79178ec
Update changelog
bruhnild Dec 18, 2024
dac8d59
Fix ref in configuration doc
bruhnild Dec 18, 2024
2b02d38
Update documentation link for gtr
bruhnild Dec 19, 2024
3bbd3ea
Remove envvar syntax
bruhnild Dec 19, 2024
b2847dc
Update docs/install/load-mnt-raster.rst
bruhnild Dec 19, 2024
4a61e69
Update docs/install/prerequisites-data.rst
bruhnild Dec 19, 2024
9ce955c
Update docs/install/prerequisites-data.rst
bruhnild Dec 19, 2024
1658cf4
Update docs/install/prerequisites-data.rst
bruhnild Dec 19, 2024
392e8c3
Fix unconsistant title and add message for initial import data
bruhnild Dec 19, 2024
e852c25
Fix unconsistant title and requirements
bruhnild Dec 19, 2024
8400fdc
Fix unconsistant title
bruhnild Dec 19, 2024
ce22fd3
Fix ref about sensitive areas
bruhnild Dec 19, 2024
0d6f3de
Update docs/install/import-from-network.rst
bruhnild Dec 19, 2024
eb442d5
Update docs/install/import-from-network.rst
bruhnild Dec 19, 2024
f06c0ff
Update docs/install/import-from-network.rst
bruhnild Dec 19, 2024
7f1693d
Update docs/install/import-from-network.rst
bruhnild Dec 19, 2024
5b21be6
Update docs/install/import-from-touristic-data-systems.rst
bruhnild Dec 19, 2024
37849f4
Update docs/install/prerequisites-data.rst
bruhnild Dec 19, 2024
60b4461
Update title and ref for minimal initial data
bruhnild Dec 19, 2024
c4e5ffb
Create Advanced configuration section and rename folders
bruhnild Dec 19, 2024
f1df83c
Fix ref for advanced configuration
bruhnild Dec 19, 2024
24d4b1a
Improve index.rst
bruhnild Dec 20, 2024
a3f4efb
Remove toc on every page
bruhnild Dec 20, 2024
8d900ec
Update docs/advanced-configuration/application-settings.rst
bruhnild Dec 20, 2024
ed6d14e
Update docs/advanced-configuration/application-settings.rst
bruhnild Dec 20, 2024
ec93e09
Update docs/advanced-configuration/application-settings.rst
bruhnild Dec 20, 2024
ac40636
Fix requirements
bruhnild Dec 20, 2024
47fd03f
Update docs/requirements.txt
bruhnild Jan 2, 2025
5ec3774
Improve doc and add new tutorial section
bruhnild Jan 2, 2025
b6cda23
Fix title underline too short
bruhnild Jan 2, 2025
3ee6629
Fix title underline too short
bruhnild Jan 2, 2025
a013b67
Fix image link
bruhnild Jan 2, 2025
e13ca90
Fix indent
bruhnild Jan 2, 2025
f5653cf
Fix images
bruhnild Jan 2, 2025
8cd5ffb
Fix note indent
bruhnild Jan 2, 2025
5fea1a1
Add notes and warnings
bruhnild Jan 3, 2025
2d61fb5
[Doc] Improve doc
babastienne Jan 6, 2025
9bc0de6
[Doc] Improve doc
babastienne Jan 6, 2025
e17548e
Reorganize sections in map settings
bruhnild Jan 6, 2025
f561c7a
Add image for tool extent and indent code in map settings page
bruhnild Jan 7, 2025
a51d6a0
Add docker command lines
bruhnild Jan 8, 2025
2c4a5fb
Fix target
bruhnild Jan 8, 2025
c7646de
Improve import data and contributing section
bruhnild Jan 8, 2025
377aac5
Fix reference
bruhnild Jan 8, 2025
4355f64
Add dynamic segmentation symbol and keyworkds note
bruhnild Jan 9, 2025
6a6e542
Add docker alternate command line
bruhnild Jan 10, 2025
5531054
Fix indent
bruhnild Jan 10, 2025
c5add73
Improve doc
bruhnild Jan 10, 2025
ffc9b7f
Improve doc with admonitions
bruhnild Jan 10, 2025
ac2e90f
Add keywords
bruhnild Jan 13, 2025
79f7295
Fix duplicate code block
bruhnild Jan 13, 2025
fa4a50b
Fix duplicate target
bruhnild Jan 13, 2025
40b86b8
Update module and components page
bruhnild Jan 22, 2025
3d67940
Improve advanced configuration pages
bruhnild Jan 30, 2025
7d02973
Update advanced configuration doc
bruhnild Jan 31, 2025
0071bd7
Improve doc advanced configuration and integration of diff
bruhnild Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/about/geotrek.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Les quatre briques
La suite logicielle Geotrek dispose de quatre briques à la fois distincts et complémentaires :

* :ref:`Geotrek-admin <qu-est-ce-que-geotrek>`: outil de gestion et de saisie de l’ensemble des informations, intégrant les données des Systèmes d’Informations Touristiques (SIT) et pouvant être connecté à votre SIG ou à des systèmes d’information transport
* `Geotrek-rando <https://github.com/GeotrekCE/Geotrek-rando-v3/blob/main/docs/presentation-fr.md>`_ : site web, reprenant les informations saisies dans Geotrek-admin, à destination des internautes grand public
* `Geotrek-rando <https://geotrek-rando-v3.readthedocs.io/stable/>`_ : site web, reprenant les informations saisies dans Geotrek-admin, à destination des internautes grand public
* `Geotrek-mobile <https://github.com/GeotrekCE/Geotrek-mobile#geotrek-mobile>`_ : application mobile fonctionnant sous Android et iOS, reprenant des informations saisies dans Geotrek-admin et optimisées pour l’usage mobile (volume, impact sur la batterie, hors-ligne, géolocalisation…)
* `Geotrek-rando-widget <https://geotrek-rando-widget.readthedocs.io/>`_ : nouveau composant web permettant de valoriser une offre de contenus touristiques et de randonnées auprès des usagers du territoire, en l'intégrant dans un site internet existant

Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CHANGELOG
- Update theme color
- Fix typo in documentation
- Update and homogenize README.rst
- Reorganize sections (#4415)

2.111.0 (2024-12-05)
----------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"media": "(prefers-color-scheme: light)",
"scheme": "default",
"primary": "red",
"accent": "deep-orange",
"accent": "pink",
"toggle": {
"icon": "material/weather-night",
"name": "Switch to dark mode",
Expand All @@ -71,7 +71,7 @@
"media": "(prefers-color-scheme: dark)",
"scheme": "slate",
"primary": "red",
"accent": "deep-orange",
"accent": "pink",
"toggle": {
"icon": "material/weather-sunny",
"name": "Switch to light mode",
Expand Down
14 changes: 12 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,22 @@ Geotrek-admin is backend management data for Geotrek-rando, Geotrek-mobile and G

install/installation
install/upgrade
install/loading-data
install/configuration
install/advanced-configuration
install/maintenance
install/exploitation-commands
install/synchronization
install/import

.. toctree::
:caption: 🗃️ Import data
:maxdepth: 2

install/prerequisites-data
install/load-mnt-raster
install/import-paths
install/import-other-data-from-file
install/import-from-network
install/import-from-touristic-data-systems

.. toctree::
:caption: ✨ Contribute
Expand Down
2 changes: 1 addition & 1 deletion docs/install/advanced-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ The following settings are related to sensitive areas:
# Take care if you change this value after adding data. You should update buffered geometry in sql.
``` UPDATE sensitivity_sensitivearea SET geom_buffered = ST_BUFFER(geom, <your new value>); ```

see :ref:`import-sensitive-areas` to import data.
see :ref:`sensitive-areas-import` to import data.

Feedback reports settings
-------------------------
Expand Down
36 changes: 21 additions & 15 deletions docs/install/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ Configuration
:local:
:depth: 2

.. _basic-configuration-update:

Basic configuration update
--------------------------
===========================

To update basic configuration (server name, database connection, languages, or set workers number or timeout), run:

Expand All @@ -19,9 +20,10 @@ To update basic configuration (server name, database connection, languages, or s
The basic configuration is stored in ``/opt/geotrek-admin/var/conf/env`` file, not to be changed manually.
This file also contains the PostgreSQL authentification details, if you need to access your Geotrek-admin database.

.. _custom-setting-file:

Custom setting file
-------------------
====================

Geotrek-admin advanced configuration is done in ``/opt/geotrek-admin/var/conf/custom.py`` file.

Expand All @@ -44,6 +46,7 @@ Sometimes you also have to run:

Don't override the ``os.getenv()`` settings as they are managed with Basic configuration.

.. _nginx-configuration:

NGINX configuration
-------------------
Expand All @@ -56,9 +59,10 @@ Modify ``/opt/geotrek-admin/var/conf/nginx.conf.in`` instead. To update ``nginx.

sudo dpkg-reconfigure geotrek-admin

.. _activate-ssl-https:

Activate SSL / HTTPS
--------------------
=====================

To activate https, you need firstly to change ``custom.py`` and add:

Expand All @@ -79,12 +83,13 @@ You have to move the configuration to the file ``nginx.conf.in`` because ``nginx

You need to replace the ``$`` from Certbot with ``${DOLLAR}`` everywhere in the ``nginx.conf.in`` file, then run the command ``sudo dpkg-reconfigure geotrek-admin`` to regenerate the file.

.. _mandatory-settings:

Mandatory settings
------------------
==================

Spatial reference identifier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------

.. code-block:: python

Expand All @@ -99,7 +104,7 @@ Spatial reference identifier of your database. Default 2154 is RGF93 / Lambert-9
.. _default-structure:

Default Structure
~~~~~~~~~~~~~~~~~
----------------------------

.. code-block:: python

Expand All @@ -114,9 +119,8 @@ Name for your default structure.
* *Change in the settings*
* *Re-run the server.*


Dynamic segmentation
~~~~~~~~~~~~~~~~~~~~
----------------------

.. code-block:: python

Expand All @@ -134,9 +138,8 @@ So if you want to use Geotrek-admin without dynamic segmentation, set TREKKING_T

Do not change it again to true after setting it to false.


Translations
~~~~~~~~~~~~
-------------

.. code-block:: python

Expand All @@ -152,9 +155,11 @@ Languages of your project. It will be used to generate fields for translations.

*You won't be able to change it easily, avoid to add any languages and do not remove any.*

.. note::
It is preferable, when in doubt, to include all necessary languages during the initial installation, even if some remain unused afterward, rather than missing some and facing complications to add them later.

Spatial extents
~~~~~~~~~~~~~~~
----------------

Boundingbox of your project : x minimum , y minimum , x max, y max::

Expand All @@ -180,15 +185,17 @@ is available at ``http://<server_url>/tools/extents/``.

Administrator privileges are required.

.. _users-management:

Users management
----------------
==================

See :ref:`user management section in usage <user-management-section>`.

.. _database-users:

Database users
--------------
===============

It is not safe to use the ``geotrek`` user in QGIS, or to give its password to
many collaborators.
Expand All @@ -199,7 +206,6 @@ With *pgAdmin*, you can create database users like this:

::


CREATE ROLE lecteur LOGIN;
ALTER USER lecteur PASSWORD 'passfacile';
GRANT CONNECT ON DATABASE geotrekdb TO lecteur;
Expand All @@ -213,6 +219,6 @@ And give them permissions by schema :
GRANT SELECT ON ALL TABLES IN SCHEMA public TO lecteur;
GRANT SELECT ON ALL TABLES IN SCHEMA geotrek TO lecteur;

You can also create groups, etc. See `PostgreSQL documentation <https://www.postgresql.org/docs/>`_.

You can also create groups, etc. See PostgreSQL documentation.

157 changes: 157 additions & 0 deletions docs/install/exploitation-commands.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
======================
Exploitation commands
======================

.. contents::
:local:
:depth: 2

.. _delete-attachement-from-disk:

Delete attachment from disk
============================

When an attachment (eg. pictures) is removed, its file is not automatically removed from disk.
You have to run ``sudo geotrek clean_attachments`` manually or in a cron to remove old files.
After that, you should run ``sudo geotrek thumbnail_cleanup`` to remove old thumbnails.

.. _remove-duplicate-paths:

Remove duplicate paths
======================

Duplicate paths can appear while adding paths with commands or directly in the application.
Duplicate paths can cause some problems of routing for topologies, it can generate corrupted topologies (that become MultiLineStrings instead of LineStrings).

You have to run ``sudo geotrek remove_duplicate_paths``

During the process of the command, every topology on a duplicate path will be set on the original path, and the duplicate path will be deleted.

.. _merge-segmented-paths:

Merge segmented paths
=====================

A path network is most optimized when there is only one path between intersections.
If the path database includes many fragmented paths, they could be merged to improve performances.

You can run ``sudo geotrek merge_segmented_paths``.

.. danger::
This command can take several hours to run. During the process, every topology on a path will be set on the path it is merged with, but it would still be more efficient (and safer) to run it before creating topologies.

Before :
::

p1 p2 p3 p5 p6 p7 p8 p9 p14
+-------+------+-------+------+-------+------+-------+------+------+
| |
| p4 | p13
| |
+ +-------
| | |
| p10 | p16 |
p11 | | |
+------+------+ p15 --------
|
| p12
|

After :
::

p1 p6 p14
+--------------+-----------------------------+---------------------+
| |
| | p13
| |
| p10 +-------
| | |
| | p16 |
p11 | | |
+------+------+ p15 --------
|
| p12
|

.. _unset-structure-on-categories:

Unset structure on categories
=============================

Use this command if you wish to undo linking categories to structures for some models.

You have to run ``sudo geotrek unset_structure``

::

usage: manage.py unset_structure [-h] [--all] [--list] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color]
[--skip-checks]
[model [model ...]]

Unset structure in lists of choices and group choices with the same name.

positional arguments:
model List of choices to manage

optional arguments:
-h, --help show this help message and exit
--all Manage all models
--list Show available models to manage
--version show program's version number and exit
-v {0,1,2,3}, --verbosity {0,1,2,3}
Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output
--settings SETTINGS The Python path to a settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.
--pythonpath PYTHONPATH
A directory to add to the Python path, e.g. "/home/djangoprojects/myproject".
--traceback Raise on CommandError exceptions
--no-color Don't colorize the command output.
--force-color Force colorization of the command output.
--skip-checks Skip system checks.

.. danger::
You can't chose for each choice which set of category you want to unset structures, it will happen for all categories

Firstly, if a categroy is linked to a structure, it creates the same category but with no structure associated.
Secondly, every element with this old category gets assigned to this new category.
Finally all old categories are removed.

.. _reorder-topologies:

Reorder topologies
===================

All topologies have information about which path they go through on and in which order.
Actually, when a path is split in 2 by another path, a new path is added to the database.
We need to add information for all topologies that need to go through this new path.
This is badly managed at the moment, especially for the order of passage of the paths.
``sudo geotrek reorder_topologies``

It removes a lot of useless information which can accelerate the process of editing topologies afterward.

During the process of this command, it tries to find a good order of passage on the paths which creates
only one Linestring from start to end. It stays as close as possible to the corrupted order. This command uses the same algorithm to generate one Linestring
when the order is not well managed during topologies' display.

.. danger::
It can happen that this algorithm can't find any solution and will genereate a MultiLineString.
This will be displayed at the end of the reorder

.. _automatic-commands:

Automatic commands
==================

You can set up automatic commands by creating a `cron` file under ``/etc/cron.d/geotrek_command`` that contains:

::

0 3 * * * root /usr/sbin/geotrek <command> <options>

example :

::

0 4 * * * root /usr/sbin/geotrek reorder_topologies

This example will automatically reorder topologies at 4 am every day.
Loading
Loading