Skip to content

some textual improvements on management commands #214

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

Merged
merged 1 commit into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 14 additions & 1 deletion admin/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GeoNode has an administration panel, based on the Django admin, which can be use
Although most of the operations can and should be done through the normal GeoNode interface,
the admin panel provides a quick overview and management tool over the database.

The following sections will explain more in depth what functionalities the admin panel makes you available.
The following sections will explain more in depth what functionalities the admin panel makes available to you.
It should be highlighted that the sections not covered in this guide are meant to be managed through GeoNode UI.

.. toctree::
Expand All @@ -16,6 +16,19 @@ It should be highlighted that the sections not covered in this guide are meant t
GeoNode Management Commands
===========================

Managemant commands are utility functions for GeoNode maintenance tasks. They are usually run from an SSH/bash shell on the server running GeoNode.
Any call to python is prepended with a configuration parameter to indicate the GeoNode settings module to be used.

.. code-block:: shell

DJANGO_SETTINGS_MODULE=geonode.settings python manage.py migrate_baseurl --help

.. note:: If you have enabled ``local_settings.py`` the command will change as follows:

.. code-block:: shell

DJANGO_SETTINGS_MODULE=geonode.local_settings python manage.py migrate_baseurl --help

.. toctree::
:caption: GeoNode Management Commands
:maxdepth: 3
Expand Down
45 changes: 24 additions & 21 deletions admin/mgmt_commands/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ Run

DJANGO_SETTINGS_MODULE=geonode.settings python manage.py migrate_baseurl --help

.. note:: If you enabled ``local_settings.py`` the command will change as following:

.. code-block:: shell

DJANGO_SETTINGS_MODULE=geonode.local_settings python manage.py migrate_baseurl --help

This will produce output that looks like the following

.. code-block:: shell
Expand Down Expand Up @@ -361,15 +355,13 @@ Loading Data into GeoNode

There are situations where it is not possible or not convenient to use the
:guilabel:`Upload Form` to add new Datasets to GeoNode via the web interface.
As an instance:

* The dataset is simply too big to be uploaded through a web interface.
For instance:

* We would like to import some data from the mass storage programmatically.
* The dataset is too big to be uploaded through a web interface.

* We would like to import some tables from a DataBase.
* Import data from a mass storage programmatically.

* We need to process the data first and, maybe, transform it to another format.
* Import tables from a database.

This section will walk you through the various options available to load data into your
GeoNode from GeoServer, from the command-line or programmatically.
Expand Down Expand Up @@ -411,9 +403,9 @@ This will produce output that looks like the following
[--force-color] [--skip-checks]
[path [path ...]]

Brings a directory full of data files into a GeoNode site.
Datasets are added to the Django database, the GeoServer configuration, and the
pycsw metadata index.
Brings files from a local directory, including subfolders, into a GeoNode site.
The datasets are added to the Django database, the GeoServer configuration, and the
pycsw metadata index. At this moment only files of type Esri Shapefile (.shp) and GeoTiff (.tif) are supported.
In order to perform the import, GeoNode must be up and running.

positional arguments:
Expand Down Expand Up @@ -448,7 +440,7 @@ reviewing some of the key options a bit more in details.

The import Datasets management command is invoked by specifying options as described
above and specifying the path to a directory that contains multiple files. For purposes of this exercise, let's use the default set of testing Datasets that ship with geonode.
You can replace this path with the directory to your own shapefiles.
You can replace this path with a directory to your own shapefiles.

.. code-block:: shell
First let's run the GeoNode server:
Expand Down Expand Up @@ -508,11 +500,10 @@ While it is possible to import Datasets directly from your servers filesystem in
GeoNode, you may have an existing GeoServer that already has data in it, or you may
want to configure data from a GeoServer which is not directly supported by uploading data.

GeoServer supports a wide range of data formats and connections to database, and while
many of them are not supported as GeoNode upload formats, if they can be configured in
GeoServer, you can add them to your GeoNode by following the procedure described below.
GeoServer supports a wide range of data formats and connections to database, some of them
may not be supported as GeoNode upload formats. You can add them to your GeoNode by following the procedure described below.

GeoServer supports 3 types of data: :guilabel:`Raster`, :guilabel:`Vector`, :guilabel:`Databases` and :guilabel:`Cascaded`.
GeoServer supports 4 types of data: :guilabel:`Raster`, :guilabel:`Vector`, :guilabel:`Databases` and :guilabel:`Cascaded`.

For a list of the supported formats for each type of data, consult the following pages:

Expand Down Expand Up @@ -638,6 +629,18 @@ First visit the GeoServer administration interface on your server. This is usual
-p PERMISSIONS, --permissions PERMISSIONS
Permissions to apply to each Dataset

The update procedure includes the following steps:

- The process fetches from GeoServer the relevant WMS layers (all, by store or by workspace)

- If a filter is defined, the GeoServer layers are filtered

- For each of the layers, a GeoNode dataset is created based on the metadata registered on GeoServer (title, abstract, bounds)

- New layers are added, existing layers are replaced, unless the :guilabel:`--skip-geonode-registered` option is used

- The GeoNode layers, added in previous runs of the update process, which are no longer available in GeoServer are removed, if the :guilabel:`--remove-delete` option is set

.. warning:: One of the :guilabel:`--workspace` or :guilabel:`--store` must be always specified if you want to ingest Datasets belonging to a specific ``Workspace``. As an instance, in order to ingest the Datasets present into the ``geonode`` workspace, you will need to specify the option ``-w geonode``.

9. Let's ingest the Dataset ``geonode:_1_SARMIENTO_ENERO_2018`` from the ``geonode`` workspace.
Expand Down Expand Up @@ -854,7 +857,7 @@ First visit the GeoServer administration interface on your server. This is usual
0 Failed Datasets
5.000000 seconds per Dataset

.. note:: In case you don't specify the :guilabel:`-f` option, the Datasets that already exist in your GeoNode will be just updated and the configuration synchronized between GeoServer and GeoNode.
.. note:: In case you don't specify the :guilabel:`-f` option, the Datasets that already exists in your GeoNode will be just updated and the configuration synchronized between GeoServer and GeoNode.

.. warning:: When updating **from** GeoServer, the configuration on GeoNode will be changed!

Expand Down