-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new section for importing data and reorganize doc
- Loading branch information
Showing
15 changed files
with
916 additions
and
834 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.