diff --git a/about/index.rst b/about/index.rst
deleted file mode 100644
index 12cedbca..00000000
--- a/about/index.rst
+++ /dev/null
@@ -1,90 +0,0 @@
-What is GeoNode
-===============
-
-.. image:: img/logo.png
-
-GeoNode is a geospatial content management system, a platform for the management and publication of geospatial data. It brings together mature and stable open-source software projects under a consistent and easy-to-use interface allowing non-specialized users to share data and create interactive maps.
-
-Data management tools built into GeoNode allow for integrated creation of data, metadata, and map visualization. Each dataset in the system can be shared publicly or restricted to allow access to only specific users. Social features like user profiles and commenting and rating systems allow for the development of communities around each platform to facilitate the use, management, and quality control of the data the GeoNode instance contains.
-
-It is also designed to be a flexible platform that software developers can extend, modify or integrate against to meet requirements in their own applications.
-
-Showcase
---------
-
-A handful of other Open Source projects extend GeoNode’s functionality
-by tapping into the re-usability of Django applications.
-Visit our gallery to see how the community uses GeoNode: `GeoNode Showcase `_.
-
-The development community is very supportive of new projects and contributes ideas and guidance for newcomers.
-
-For a live demo see also :ref:`online_demo`
-
-Most useful links
------------------
-
-**General**
-
-- Project homepage: https://geonode.org
-- Repository: https://github.com/GeoNode/geonode
-- Official Demo: http://master.demo.geonode.org
-- GeoNode Wiki: https://github.com/GeoNode/geonode/wiki
-- Issue tracker: https://github.com/GeoNode/geonode-project/issues
-
- In case of sensitive bugs like security vulnerabilities, please
- contact a GeoNode Core Developer directly instead of using issue
- tracker. We value your effort to improve the security and privacy of
- this project!
-
-**Related projects**
-
-- GeoNode Project: https://github.com/GeoNode/geonode-project
-- GeoNode at Docker: https://hub.docker.com/u/geonode
-- GeoNode OSGeo-Live: https://live.osgeo.org/en/
-
-
-Licensing
-=========
-
-GeoNode is Copyright 2018 Open Source Geospatial Foundation (OSGeo).
-
-GeoNode is free software: you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation, either version 3 of the License, or (at your
-option) any later version. GeoNode is distributed in the hope that it
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with GeoNode. If not, see http://www.gnu.org/licenses.
-
-Current Version and Features
-============================
-
-GeoNode current version: `3.2.0 `_
-
-Main Features: `State of GeoNode `_
-
-.. _get_in_touch:
-
-Get in touch with the community
-===============================
-
-GeoNode is an open source project and contributors are needed to keep this project moving forward. Learn more on how to contribute on our
-`Community Bylaws `_.
-
-- User Mailing List: https://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
-- Developer Mailing List: https://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-devel
-- Gitter Chat: https://gitter.im/GeoNode/general
-
-Roadmap
-=======
-
-GeoNode's development roadmap is documented in a series of GeoNode Improvement Projects (GNIPS).
-They are documented at `GeoNode Wiki `_.
-
-GNIPS are considered to be large undertakings which will add a large amount of features to the project.
-As such they are the topic of community discussion and guidance.
-
-The community discusses these on the developer mailing list: http://lists.osgeo.org/pipermail/geonode-devel/
diff --git a/admin/admin_panel/index.rst b/admin/admin_panel/index.rst
deleted file mode 100644
index 57ef41e0..00000000
--- a/admin/admin_panel/index.rst
+++ /dev/null
@@ -1,1046 +0,0 @@
-Accessing the panel
-===================
-
-| The *Admin Panel* is a model-centric interface where trusted users can manage content on GeoNode.
-| Only the staff users can access the admin interface.
-
-.. note:: The “staff” flag, which controls whether the user is allowed to log in to the admin interface, can be set by the admin panel itself.
-
-The panel can be reached from :guilabel:`Admin` link of the *User Menu* in the navigation bar (see the picture below) or through this URL: ``http:///admin``.
-
-.. figure:: img/admin_link.png
- :align: center
-
- *The Admin Link of the User Menu*
-
-When clicking on that link the Django-based *Admin Interface* page opens and shows you all the Django models registered in GeoNode.
-
-.. figure:: img/django_geonode_admin_interface.png
- :align: center
-
- *The GeoNode Admin Interface*
-
-Reset or Change the admin password
-==================================
-
-From the *Admin Interface* you can access the :guilabel:`Change password` link by clicking on the username on the right side of the navigation bar. which will open a dropdown.
-
-.. figure:: img/change_password_link.png
- :align: center
-
- *The Change Password Link*
-
-It allows you to access the *Change Password Form* through which you can change your password.
-
-.. figure:: img/change_password_form.png
- :align: center
-
- *The Change Password Form*
-
-Once the fields have been filled out, click on :guilabel:`Change my password` to perform the change.
-
-.. _simple-theming:
-
-Simple Theming
-==============
-
-GeoNode provides by default some theming options manageable directly from the Administration panel.
-Most of the times those options allows you to easily change the GeoNode look and feel without touching a single line of `HTML` or `CSS`.
-
-As an `administrator` go to ``http:///admin/geonode_themes/geonodethemecustomization/``.
-
-.. figure:: img/theming/themes.png
- :align: center
-
- *List of available Themes*
-
-The panel shows all the available GeoNode themes, if any, and allows you to create new ones.
-
-.. warning:: Only one theme at a time can be **activated** (aka *enabled*). By disabling or deleting all the available themes, GeoNode will turn the gui back to the default one.
-
-Editing or creating a new Theme, will actually allow you to customize several properties.
-
-At least you'll need to provide a ``Name`` for the Theme. Optionally you can specify also a ``Description``, which will allow you to better
-identify the type of Theme you created.
-
-.. figure:: img/theming/theme-def-0001.png
- :align: center
-
- *Theme Name and Description*
-
-Just below the ``Description`` field, you will find the ``Enabled`` checkbox, allowing you to toggle the Theme.
-
-.. figure:: img/theming/theme-def-0002.png
- :align: center
-
- *Theme Name and Description*
-
-Jumbotron and Get Started link
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. note:: Remember, everytime you want to apply some changes to the Theme, you **must** save the Theme and reload the GeoNode browser tab.
- In order to quickly switch back to the Home page, you can just click the ``VIEW SITE`` link on the top-right corner of the Admin dashboard.
-
- .. figure:: img/theming/view_site.png
- :align: center
-
-The next section, allows you to define the first important Theme properties. This part involves the GeoNode main page sections.
-
-.. figure:: img/theming/theme_properties.png
- :align: center
-
- *Jumbotron and Logo options*
-
-By changing those properties as shown above, you will easily change your default home page from this
-
-.. figure:: img/theming/default_theme.png
- :align: center
-
- *GeoNode Default Home*
-
-to this
-
-.. figure:: img/theming/first_customization.png
- :align: center
-
- *Updating Jumbotron and Logo*
-
-It is possible to optionally **hide** the ``Jumbotron text``.
-
-.. figure:: img/theming/hide_jumbotron.png
- :align: center
-
-.. figure:: img/theming/hide_jumbotron_view.png
- :align: center
-
- *Hide Jumbotron text*
-
-Slide show
-^^^^^^^^^^
-To switch between a slide show and a jumbotron, flip the value of the welcome theme from "slide show" to "jumbotron" and vice versa to either display a jumbotron with content or a slide show in the home page
-
-For example, to display a slide show, change the welcome theme from jumbotron background
-
-.. figure:: img/theming/theme-def-0007a.png
- :align: center
-
-to slide show
-
-.. figure:: img/theming/theme-def-0007b.png
- :align: center
-
-Before creating a slide show, make sure you have slides to select from (in the multi-select widget) to make up the slide show.
-
-.. figure:: img/theming/theme-def-0007c.png
- :align: center
-
-If no slides exist, click the plus (+) button beside the slide show multi-select widget to add a new slide.
-
-.. figure:: img/theming/theme-def-0007d.png
- :align: center
-
-Fill in the slide name, slide content using markdown formatting, and upload a slide image (the image that will be displayed when the slide is in view).
-
-.. figure:: img/theming/theme-def-0007e.png
- :align: center
-
-For slide images that already contain text, hide slide content by checking the checkbox labeled "Hide text in the jumbotron slide" as shown below, then save the slide.
-
-.. figure:: img/theming/theme-def-0007f.png
- :align: center
-
-It is also possible to hide a slide from all slide show themes that use it by unchecking the checkbox labeled "Is enabled" as shown below.
-
-.. figure:: img/theming/theme-def-0007g.png
- :align: center
-
-Selecting the above slide in a slide show and enabling slide show (using the "welcome theme" configuration) will create a slide show with a slide as shown below:
-
-.. figure:: img/theming/theme-def-0007h.png
- :align: center
-
-Switching between different themes
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-In the case you have defined more Themes, switching between them is as easy as ``enabling`` one and ``disabling`` the others.
-
-Remember to save the Themes everytime and refresh the GeoNode home page on the browser to see the changes.
-
-It is also important that there is **only one** Theme enabled **at a time**.
-
-In order to go back to the standard GeoNode behavior, just disable or delete all the available Themes.
-
-Add a new user
-==============
-
-In GeoNode, administrators can manage other users. For example, they can *Add New Users* through the following form.
-
-.. figure:: img/add_user_form.png
- :align: center
-
- *Adding New Users*
-
-The form above can be reached from the *Admin Panel* at the following path: *Home > People > Users*. Click on :guilabel:`+ Add user` to open the form page.
-
-.. figure:: img/add_user_button.png
- :align: center
-
- *The Add User button in the Users List page*
-
-It is also available, in the GeoNode UI, the :guilabel:`Add User` link of the *About* menu in the navigation bar.
-
-.. figure:: img/add_user_link.png
- :align: center
-
- *Add User Link*
-
-To perform the user creation fill out the required fields (*username* and *password*) and click on :guilabel:`Save`.
-You will be redirected to the *User Details Page* which allows to insert further information about the user.
-
-.. figure:: img/user_details_admin_page.png
- :align: center
-
- *The User Details Page*
-
-The user will be visible into the *Users List Page* of the *Admin Panel* and in the *People Page* (see :ref:`user-info`).
-
-.. figure:: img/new_user_in_people.png
- :align: center
-
- *The User in the People page*
-
-Activate/Disable a User
-=======================
-
-When created, new users are *active* by default.
-You can check that in the *User Details Page* from the *Admin Panel* (see the picture below).
-
-.. figure:: img/new_user_active.png
- :align: center
-
- *New Users Active by default*
-
-| *Active* users can interact with other users and groups, can manage resources and, more in general, can take actions on the GeoNode platform.
-| Untick the *Active* checkbox to disable the user. It will be not considered as user by the GeoNode system.
-
-.. figure:: img/new_user_disabled.png
- :align: center
-
- *Disabled Users*
-
-Change a User password
-======================
-
-GeoNode administrators can also change/reset the password for those users who forget it.
-As shown in the picture below, click on ``this form`` link from the *User Details Page* to access the *Change Password Form*.
-
-.. figure:: img/change_user_password_link.png
- :align: center
-
- *Changing Users Passwords*
-
-The *Change User Password Form* should looks like the following one.
-Insert the new password two times and click on :guilabel:`CHANGE PASSWORD`.
-
-.. figure:: img/change_user_password_form.png
- :align: center
-
- *Changing Users Passwords*
-
-Promoting a User to Staff member or superuser
-=============================================
-
-Active users have not access to admin tools.
-GeoNode makes available those tools only to *Staff Members* who have the needed permissions.
-*Superusers* are staff members with full access to admin tools (all permissions are assigned to them).
-
-Administrators can promote a user to *Staff Member* by ticking the **Staff status** checkbox in the *User Details Page*.
-To make some user a *Superuser*, the **Superuser status** checkbox should be ticked. See the picture below.
-
-.. figure:: img/staff_and_superuser_permissions.png
- :align: center
-
- *Staff and Superuser permissions*
-
-Creating a Group
-================
-
-| In GeoNode is possible to create new groups with set of permissions which will be inherited by all the group members.
-| The creation of a Group can be done both on the GeoNode UI and on the *Admin Panel*, we will explain how in this paragraph.
-
-The :guilabel:`Create Groups` link of *About* menu in the navigation bar allows administrators to reach the *Group Creation Page*.
-
-.. figure:: img/create_group_page_link.png
- :align: center
-
- *The Create Group Link*
-
-The following form will open.
-
-.. figure:: img/group_creation_form.png
- :align: center
-
- *The Group Creation Form*
-
-Fill out all the required fields and click :guilabel:`Create` to create the group.
-The *Group Details Page* will open.
-
-.. figure:: img/group_details_page.png
- :align: center
-
- *The Group Details Page*
-
-The new created group will be searchable in the *Groups List Page*.
-
-.. figure:: img/groups_list_page.png
- :align: center
-
- *The Groups List Page*
-
-.. note:: The :guilabel:`Create a New Group` button on the *Groups List Page* allows to reach the *Group Creation Form*.
-
-| As already mentioned above, groups can also be created from the Django-based *Admin Interface* of GeoNode.
-| The *Groups* link of the *AUTHENTICATION AND AUTHORIZATION* section allows to manage basic Django groups which only care about permissions.
-| To create a GeoNode group you should take a look at the *GROUPS* section.
-
-.. figure:: img/groups_admin_section.png
- :align: center
-
- *The Groups Section on the Admin Panel*
-
-As you can see, GeoNode provides two types of groups. You will learn more about that in the next paragraph.
-
-Types of Groups
-^^^^^^^^^^^^^^^
-
-In GeoNode users can be grouped through a *Group Profile*, an enhanced Django group which can be enriched with some further information such as a description, a logo, an email address, some keywords, etc.
-It also possible to define some *Group Categories* based on which those group profiles can be divided and filtered.
-
-A new **Group Profile** can be created as follow:
-
-* click on the *Group Profile* :guilabel:`+ Add` button
-
-* fill out all the required fields (see the picture below), *Group Profiles* can be explicitly related to group categories
-
- .. figure:: img/new_group_profile_form.png
- :align: center
-
- *A new Group Profile*
-
-* click on :guilabel:`Save` to perform the creation, the new created group profile will be visible in the *Group Profiles List*
-
- .. figure:: img/group_profiles_list.png
- :align: center
-
- *The Group Profiles List*
-
-Group Categories
-^^^^^^^^^^^^^^^^
-
-*Group Profiles* can also be related to *Group Categories* which represents common topics between groups.
-In order to add a new **Group Category** follow these steps:
-
-* click on the *Group Categories* :guilabel:`+ Add group category` button
-
-* fill out the creation form (type *name* and *description*)
-
- .. figure:: img/new_group_category_form.png
- :align: center
-
- *A new Group Category*
-
-* click on :guilabel:`Save` to perform the creation, the new created category will be visible in the *Group Categories List*
-
- .. figure:: img/group_categories_list.png
- :align: center
-
- *The Group Categories List*
-
-
-Managing a Group
-================
-
-Through the :guilabel:`Groups` link of *About* menu in the navigation bar, administrators can reach the *Groups List Page*.
-
-.. figure:: img/groups_link.png
- :align: center
-
- *The Groups Link in the navigation bar*
-
-In that page all the GeoNode *Group Profiles* are listed.
-
-.. figure:: img/group_profiles_list_page.png
- :align: center
-
- *Group Profiles List Page*
-
-For each group some summary information (such as the *title*, the *description*, the number of *members* and *managers*) are displayed near the *Group Logo*.
-
-Administrators can manage a group from the *Group Profile Details Page* which is reachable by clicking on the *title* of the group.
-
-.. figure:: img/group_profile_details_page.png
- :align: center
-
- *Group Profile Details Page*
-
-As shown in the picture above, all information about the group are available on that page:
-
-* the group *Title*;
-* the *Last Editing Date* which shows a timestamp corresponding to the last editing of the group properties;
-* the *Keywords* associated with the group;
-* *Permissions* on the group (Public, Public(invite-only), Private);
-* *Members* who join the group;
-* *Managers* who manage the group.
-
-There are also four links:
-
-* The :guilabel:`Edit Group Details` link opens the *Group Profile Form* through which the following properties can be changed:
-
- * *Title*.
- * *Logo* (see next paragraphs).
- * *Description*.
- * *Email*, to contact one or all group members.
- * *Keywords*, a comma-separated list of keywords.
- * *Access*, which regulates permissions:
-
- * *Public*: any registered user can view and join a public group.
- * *Public (invite-only)*: only invited users can join, any registered user can view the group.
- * *Private*: only invited users can join the group, registered users cannot see any details about the group, including membership.
-
- * *Categories*, the group categories the group belongs to.
-
-* :guilabel:`Manage Group Members` (see next paragraphs).
-* the :guilabel:`Delete this Group`, click on it to delete the Group Profile. GeoNode requires you to confirm this action.
-
- .. figure:: img/confirm_group_deletion.png
- :align: center
- :width: 400px
-
- *Confirm Group Deletion*
-
-* the :guilabel:`Group Activities` drives you to the *Group Activities Page* where you can see all datasets, maps and documents associated with the group. There is also a *Comments* tab which shows comments on those resources.
-
- .. figure:: img/group_activities.png
- :align: center
-
- *Group Activities*
-
-Group Logo
-^^^^^^^^^^
-
-Each group represents something in common between its members.
-So each group should have a *Logo* which graphically represents the idea that identify the group.
-
-On the *Group Profile Form* page you can insert a logo from your disk by click on :guilabel:`Browse...`.
-
-.. figure:: img/editing_group_logo.png
- :align: center
-
- *Editing the Group Logo*
-
-| Click on :guilabel:`Update` to apply the changes.
-| Take a look at your group now, you should be able to see that logo.
-
-.. figure:: img/group_logo.png
- :align: center
-
- *The Group Logo*
-
-Managing Group members
-^^^^^^^^^^^^^^^^^^^^^^
-
-The :guilabel:`Manage Group Members` link opens the *Group Members Page* which shows *Group Members* and *Group Managers*.
-**Managers** can edit group details, can delete the group, can see the group activities and can manage memberships.
-Other **Members** can only see the group activities.
-
-| In Public Groups, users can join the group without any approval.
- Other types of groups require the user to be invited by the group managers.
-| Only group managers can *Add new members*.
- In the picture below, you can see the manager can search for users by typing their names into the *User Identifiers* search bar.
- Once found, he can add them to the group by clicking the :guilabel:`Add Group Members` button.
- The *Assign manager role* flag implies that all the users found will become managers of the group.
-
-.. figure:: img/add_new_member.png
- :align: center
-
- *Adding a new Member to the Group*
-
-The following picture shows you the results.
-
-.. figure:: img/new_members.png
- :align: center
-
- *New Members of the Group*
-
-If you want to change the role of group members after adding them, you can use the "promote" button to make a member into a manager, and the "demote" button to make a manager into a regular member.
-
-Group based advanced data workflow
-==================================
-
-By default GeoNode is configured to make every resource suddenly available to everyone, i.e. publicly accessible
-even from anonymous/non-logged in users.
-
-It is actually possible to change few configuration settings in order to allow GeoNode to enable an advanced publication workflow.
-
-With the advanced workflow enabled, your resources won't be automatically published (i.e. made visible and accessible for all, contributors or simple users).
-
-For now, your item is only visible by yourself, the manager of the group to which the resource is linked (this information is filled in the metadata), the members of this group, and the GeoNode Administrators.
-
-Before being published, the resource will follow a two-stage review process, which is described below:
-
-.. figure:: img/adv_data_workflow/adv_data_workflow_001.jpg
- :align: center
-
- *From upload to publication: the review process on GeoNode*
-
-How to enable the advanced workflow
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-You have to tweak the GeoNode settings accordingly.
-
-Please see the details of the following GeoNode ``Settings``:
-
-* `RESOURCE_PUBLISHING <../../basic/settings/index.html#resource-publishing>`_
-
-* `ADMIN_MODERATE_UPLOADS <../../basic/settings/index.html#admin-moderate-uploads>`_
-
-* `GROUP_PRIVATE_RESOURCES <../../basic/settings/index.html#group-private-resources>`_
-
-Summarizing, when all the options above of the Advanced Workflow are enabled, upon a new upload we will have:
-
- - The **"unpublished"** resources will be **hidden** to **anonymous users only**. The **registered users** will be still able to access the resources (if they have the rights to do that, of course).
-
- - The **"unpublished"** resources will remain hidden to users if the permission (see *Admin Guide section: 'Manage Permissions'*) will be explicitly removed
-
- - During the upload, whenever the advanced workflow is enabled, the **owner's Groups** are automatically allowed to access the resource, even if the **"anonymous"** flag has been disabled. Those permissions can be removed later on
-
- - During the upload, **"managers"** of the owner's Groups associated to the resource, are always allowed to edit the resource, the same as they are admin for that resource
-
- - **"managers"** of the owner's Groups associated to the resource are allowed to **"publish"** also the resources, not only to **"approve"** them
-
-
-Change the owner rights in case of advanced workflow is on
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-After switching ``ADMIN_MODERATE_UPLOADS`` to True and resource is approved owner is no longer able
-to modify it. He will see new button on the resource detail page: Request change. After clicking this, view with short
-form is shown.
-On this view user can write short message why he want to modify the resource.
-
-This message will be sent through messaging and email system to administrators:
-
-After administrator unapprove the resource owner is again able to modify it.
-
-The group Manager approval
-^^^^^^^^^^^^^^^^^^^^^^^^^^
-Here, the role of the Manager of the group to which your dataset, document or map is linked is to check that the uploaded item is correct.
-Particularly, in the case of a dataset or a map, it consists of checking that the chosen cartographic representation and the style are
-fitting but also that the discretization is appropriate.
-
-The Manager must also check that the metadata are properly completed and that the mandatory information
-(Title, Abstract, Edition, Keywords, Category, Group, Region) are filled.
-
-If needed, the Manager can contact the contributor responsible of the dataset, document or map in order to report potential comments or
-request clarifications.
-
-Members of the group can also take part in the reviewing process and give some potential inputs to the responsible of the
-dataset, document or map.
-
-When the Manager considers that the resource is ready to be published, he should approve it.
-To do so, the Manager goes to the resource detail page, then opens the :guilabel:`Edit Metadata`.
-In the :guilabel:`Settings` tab, the manager checks the :guilabel:`Approved` box, and then updates the metadata and saves the changes:
-
-Following this approval, the GeoNode Administrators receive a notification informing them that an item is now waiting for publication
-
-
-The publication by the GeoNode Administrator
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Prior to the public release of an approved resource, the Administrator of the platform performs a final validation of
-the item and its metadata, notably to check that it is in line with license policies.
-
-If needed, the GeoNode Administrator can contact the Manager who has approved the resource, as well as its responsible.
-
-Once the resource is validated, the item is made public by the Administrator.
-It can now be viewed, accessed, and downloaded in accordance with the ``Permissions`` set by the responsible contributor.
-
-Promotion, Demotion and Removal of Group Members
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-If the owner is a group Manager, They have permissions to edit, approve, and publish the resource.
-
-When a group member is promoted to a manager role, they gain permissions to edit, approve and publish the resource.
-
-When a group manager is demoted to a member role, they lose edit permissions of the resource and only remain with view and download permissions.
-
-When a member is removed from the group, they can nolonger access the unpublished resource anymore.
-
-Manage profiles using the admin panel
-=====================================
-
-So far GeoNode implements two distinct roles, that can be assigned to resources such as datasets, maps or documents:
-
-* party who authored the resource
-* party who can be contacted for acquiring knowledge about or acquisition of the resource
-
-These two profiles can be set in the GeoNode interface by accessing the metadata page and setting the ``Point of Contact`` and ``Metadata Author`` fields respectively.
-
-Is possible for an administrator to add new roles if needed, by clicking on the :guilabel:`Add contact role` button in the :guilabel:`Base -> Contact Roles` section:
-
-.. figure:: img/admin-roles-add.png
- :align: center
-
-Clicking on the :guilabel:`People` section (see figure) will open a web for with some personal information plus a section called :guilabel:`Users`.
-
-.. figure:: img/admin-people.png
-
-Is important that this last section is not modified here unless the administrator is very confident in that operation.
-
-.. figure:: img/admin-profiles-contactroles.png
- :align: center
-
-Manage datasets using the admin panel
-===================================
-
-Some of the datasets information can be edited directly through the admin interface although the best place is in the :guilabel:`Dataset -> Metadata Edit` in GeoNode.
-
-Clicking on the :guilabel:`Admin > Dataset > Datasets` link will show the list of available datasets.
-
-.. figure:: img/admin-datasets.png
- :align: center
-
-.. warning:: It is not recommended to modify the Datasets' ``Attributes`` or ``Styles`` directly from the Admin dashboard unless you are aware of your actions.
-
-The ``Metadata`` information can be changed for multiple datasets at once through the :guilabel:`Metadata batch edit` action. Select the datasets you want to edit in the batch and at the bottom, enter the `Metadata batch edit` action then click :guilabel:`Go`.
-
-.. figure:: img/admin-datasets-batch.png
- :align: center
-
-This will open a form with the information you can edit in a batch. see picture below.
-
-.. figure:: img/admin-datasets-batch-form.png
- :align: center
-
-By clicking over one Dataset link, it will show a detail page allowing you to modify some of the resource info like the metadata, the keywords, the title, etc.
-
-.. note:: It is strongly recommended to always use the GeoNode resource :guilabel:`Edit Metadata` or :guilabel:`Advanced Metadata` tools in order to edit the metadata info.
-
-The ``Permissions`` can be changed also for multiple Datasets at once through the :guilabel:`Set permissions` action.
-
-.. figure:: img/set_datasets_permissions_action.png
- :align: center
-
-By clicking over one Dataset link, it will show a detail page allowing you to modify the permissions for the selected resources.
-
-
-Manage the maps using the admin panel
-=====================================
-
-Similarly to the Datasets, it is possible to manage the available GeoNode Maps through the Admin panel also.
-
-Move to :guilabel:`Admin > Maps` to access the Maps list.
-
-.. figure:: img/admin-maps.png
- :align: center
-
-Notice that by enabling the ``Featured`` option here, will allow GeoNode to show the Map thumbnail and the Map detail link at the top under featured resources on the :guilabel:`Home Page`
-
-.. figure:: img/admin-maps-featured-001.png
- :align: center
-
-.. figure:: img/admin-maps-featured-002.png
- :align: center
-
-Manage the documents using the admin panel
-==========================================
-
-Similarly to the Datasets and Maps, it is possible to manage the available GeoNode Documents through the Admin panel also.
-
-Move to :guilabel:`Admin > Documents` to access the Documents list.
-
-.. figure:: img/admin-documents.png
- :align: center
-
-By clicking over one Document link, it will show a detail page allowing you to modify some of the resource info like the metadata, the keywords, the title, etc.
-
-Manage the base metadata choices using the admin panel
-======================================================
-
-:guilabel:`Admin > Base` contains almost all the objects you need to populate the resources metadata choices.
-
-.. figure:: img/metadata-base/admin-panel-metadata-contents-0001.png
- :align: center
-
- *Admin dashboard Base Panel*
-
-In other words the options available from the :guilabel:`select-boxes` of the resource :guilabel:`Edit Metadata` and :guilabel:`Advanced Metadata` forms.
-
-.. figure:: img/metadata-base/admin-panel-metadata-contents-0002.png
- :align: center
-
- *Metadata Form*
-
-.. figure:: img/metadata-base/admin-panel-metadata-contents-0003.png
- :align: center
-
- *Advanced Metadata Form*
-
-.. note:: When editing the resource metadata through the :guilabel:`Edit Metadata`, some fields are marked as ``mandatory`` and by filling those information
- the ``Completeness`` progress will advance accordingly.
-
- .. figure:: img/metadata-base/admin-panel-metadata-contents-0003a.png
- :align: center
-
- *Metadata Completeness*
-
- Even if not all the fields have been filled, the system won't prevent you to update the metadata; this is why the ``Mandatory`` fields are
- mandatory to be fully compliant with an ``ISO 19115`` metadata schema, but are only recommended to be compliant with GeoNode.
-
- Also the ``Completeness`` indicates how far the metadata is to be compliant with an ``ISO 19115`` metadata schema.
-
- Of course, it is **highly** recommended to always fill as much as possible at least all the metadata fields marked as ``Mandatory``.
-
- This will improve not only the quality of the data stored into the system, but will help the users to easily search for them on GeoNode.
-
- All the ``Search & Filter`` panels and options of GeoNode are, in fact, based on the resources metadata fields. Too much generic descriptions and
- too empty metadata fields, will give highly un-precise and very wide search results to the users.
-
-Hierarchical keywords
-^^^^^^^^^^^^^^^^^^^^^
-
-Through the :guilabel:`Admin > Base > Hierarchical keywords` panel it will be possible to manage all the keywords associated to the resources.
-
-.. figure:: img/metadata-base/admin-panel-metadata-contents-0004.png
- :align: center
-
- *Hierarchical keywords list*
-
-.. figure:: img/metadata-base/admin-panel-metadata-contents-0005.png
- :align: center
-
- *Hierarchical keywords edit*
-
-* The :guilabel:`Name` is the human readable text of the keyword, what users will see.
-
-* The :guilabel:`Slug` is a unique label used by the system to identify the keyword; most of the times it is equal to the name.
-
-Notice that through the :guilabel:`Position` and :guilabel:`Relative to` selectors, it is possible to establish a hierarchy between the available keywords.
-The hierarchy will be reflected in the form of a tree from the metadata panels.
-
-By default each user with editing metadata rights on any resource, will be able to insert new keywords into the system by simply typing a free text on the keywords metadata field.
-
-It is possible to force the user to select from a fixed list of keywords through the `FREETEXT_KEYWORDS_READONLY <../../basic/settings/index.html#freetext-keywords-readonly>`_ setting.
-
-When set to `True` keywords won't be writable from users anymore. Only admins can will be able to manage them through the :guilabel:`Admin > Base > Hierarchical keywords` panel.
-
-Licenses
-^^^^^^^^
-
-Through the :guilabel:`Admin > Base > Licenses` panel it will be possible to manage all the licenses associated to the resources.
-
-.. figure:: img/metadata-base/admin-panel-metadata-contents-0006.png
- :align: center
-
- *Metadata editor Licenses*
-
-.. warning:: It is **strongly** recommended to not publish resources without an appropriate license. Always make sure the data provider specifies the correct license and that all the restrictions have been honored.
-
-Metadata Regions
-^^^^^^^^^^^^^^^^
-
-Through the :guilabel:`Admin > Base > Metadata Regions` panel it will be possible to manage all the admin areas associated to the resources.
-
-.. figure:: img/metadata-base/admin-panel-metadata-contents-0009.png
- :align: center
-
- *Resource Metadata Regions*
-
-Notice that those regions are used by GeoNode to filter search results also through the resource list view.
-
-.. note:: GeoNode tries to guess the ``Regions`` intersecting the data bounding boxes when uploading a new dataset. Those should be refined by the user dataset on anyway.
-
-Metadata Restriction Code Types and Spatial Representation Types
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Through the :guilabel:`Admin > Base > Metadata Restriction Code Types` and :guilabel:`Admin > Base > Metadata Spatial Representation Types` panels, it will
-be possible to **update only** the metadata descriptions for restrictions and spatial representation types.
-
-Such lists are *read-only* by default since they have been associated to the specific codes of the ``ISO 19115`` metadata schema.
-Changing them would require the system to provide a custom dictionary through the metadata catalog too. Such functionality is not supported actually by GeoNode.
-
-Metadata Topic Categories
-^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Through the :guilabel:`Admin > Base > Metadata Topic Categories` panel it will be possible to manage all the resource metadata categories avaialble into the system.
-
-Notice that by default, GeoNode provides the standard topic categories available with the ``ISO 19115`` metadata schema. Changing them means that the system won't be
-compliant with the standard ``ISO 19115`` metadata schema anymore. ``ISO 19115`` metadata schema extensions are not currently supported natively by GeoNode.
-
-It is worth notice that GeoNode allows you to associate `Font Awesome Icons `_ to each topic category through their ``fa-icon`` code.
-Those icons will be used by GeoNode to represent the topic category on both the ``Search & Filter`` menus and :guilabel:`Metadata` panels.
-
-.. warning:: The list of the ``Metadata Topic Categories`` on the home page is currently fixed. To change it you will need to update or override the GeoNode ``index.html`` HTML template.
-
-By default the ``Metadata Topic Categories`` are *writable*. Meaning that they can be removed or created by the :guilabel:`Admin` panel.
-
-It is possible to make them fixed (it will be possible to update their descriptions and icons only) through the `MODIFY_TOPICCATEGORY <../../basic/settings/index.html#modify-topiccategory>`_ setting.
-
-Announcements
-=============
-
-As an Administrator you might need to broadcast announcements to the world about your portal or simply to the internal contributors.
-
-GeoNode ``Announcements`` allow actually to do that; an admin has the possibility to create three types of messages, accordingly to their severity,
-decide their validity in terms of time period (start date and expiring date of the announcement), who can view them or not (everyone or just the
-registerd members) and whenever a user can hide the message or not and how long.
-
-
-There are three types of announcements accordingly to their severity level: ``General``, ``Warning`` and ``Critical``
-The difference is mainly the color of the announcement box.
-
-
-Only administrators and staff members can create and manage announcements.
-
-Currently there two ways to access and manage the announcements list:
-
-#. Via the GeoNode interface, from the :guilabel:`Profile` panel
-
- .. note:: Those are accessible by both admins and staff members.
-
- .. figure:: img/announcments/admin-announcments-005.png
- :align: center
-
- *Announcements from the Profile panel*
-
-#. Via the GeoNode :guilabel:`Admin` panel
-
- .. note:: Those are accessible by admins only.
-
- .. figure:: img/announcments/admin-announcments-006.png
- :align: center
-
- *Announcements from the Admin panel*
-
-The functionalities are almost the same for both the interfaces, except that from the :guilabel:`Admin` panel it is possible to manage the
-dismissals too.
-
-``Dismissals`` are basically records of members that have read the announcement and closed the message box. An announcement can have one
-``dismissal type`` among the three below:
-
-#. :guilabel:`No Dismissal Allowed` it won't be possible to close the announcement's message box at all.
-
-#. :guilabel:`Session Only Dismissal` (*) the default one, it will be possible to close the announcement's message box for the current browser session. It will show up again at next access.
-
-#. :guilabel:`Permanent Dismissal Allowed` once the announcement's message box is closed, it won't appear again for the current member.
-
-How to create and manage Announcements
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-From the :guilabel:`Profile` panel, click on ``Announcements`` link
-
-.. figure:: img/announcments/admin-announcments-007.png
- :align: center
-
- *Announcements List from the Profile panel*
-
-Click either on :guilabel:`New Announcement` to create a new one or over a title of an existing one to manage its contents.
-
-Create a new announcement is quite straight; you have to fill the fields provided by the form.
-
-.. warning:: In order to be visible, you will need to check the :guilabel:`Site wide` option **in any case**. You might want to hide the message to *anonymous* users by enabling the :guilabel:`Members only` option too.
-
-.. figure:: img/announcments/admin-announcments-008.png
- :align: center
-
- *Create Announcement from the Profile panel*
-
-Managing announcements form the :guilabel:`Admin` panel, is basically the same; the fields for the form will be exactly the same.
-
-.. figure:: img/announcments/admin-announcments-009.png
- :align: center
-
- *Create Announcement from the Admin panel*
-
-Accessing announcements options from the :guilabel:`Admin` panel, allows you to manage dismissals also.
-Through this interface you will be able to selectively decide members which can or cannot view a specific announcement, or force them to visualize the messages again by deleting the dismissals accordingly.
-
-.. figure:: img/announcments/admin-announcments-010.png
- :align: center
-
- *Create Dismissal from the Admin panel*
-
-Menus, Items and Placeholders
-=============================
-
-GeoNode provides some integrated functionalities allowing you to quickly and easily customize the top-bar menu (see the example below).
-
-.. figure:: img/admin-panel-menus-0000.png
- :align: center
-
- *GeoNode Top-Bar Menu customization*
-
-With minor changes of the ``basic.html`` template, potentially, it could be possible to use the same approach for a more complex customization.
-Let's start with the simple one.
-
-By default GeoNode provides custom ``placeholders`` already defined into the ``basic.html`` template, called ``CARDS_MENU``, ``TOPBAR_MENU_RIGHT``, ``TOPBAR_MENU_LEFT``, ``TOPBAR_MENU``.
-
-From the :guilabel:`Admin > Base` panel, it is possible to access to the ``Menu``, ``Menu Items`` and ``Menu Placeholder`` options.
-
-.. figure:: img/admin-panel-menus-0001.png
- :align: center
-
- *Menu, Menu Items and Menu Placeholder options on the Admin panel*
-
-The hierarchical structure of a custom ``Menu`` is the following one:
-
-1. ``Menu Placeholder``; first of all you need to define a *placeholder* both into the :guilabel:`Admin > Base` panel and the ``basic.html`` template, using the same **keyword**.
- By default GeoNode provides already defined menus.
-
- .. figure:: img/admin-panel-menus-0002.png
- :align: center
-
- *The default ``TOPBAR_MENU`` Menu Placeholder on the Admin panel*
-
-2. ``Menu``; second thing to do is to create a new *menu* associated to the corresponding *placeholder*.
- This is still possible from the :guilabel:`Admin > Base` panel
-
- .. figure:: img/admin-panel-menus-0003.png
- :align: center
-
- *Create a new Menu from the Admin panel*
-
- You will need to provide:
-
- * A ``Title``, representing the name of the ``Menu`` visible by the users
-
- .. warning:: By using this approach, internationalization won't be supported. For the time being GeoNode does not support this for menus created from the :guilabel:`Admin > Base` panel.
-
- * A ``Menu Placeholder`` from the existing ones.
-
- * A ``Order`` in the case you'll create more menus associated to the same placeholder.
-
-3. ``Menu Item``; finally you will need to create voices belonging to the *menu*. For the time being, GeoNode allows you to create only ``href`` links.
-
- .. figure:: img/admin-panel-menus-0004.png
- :align: center
-
- *Create a new Menu Item from the Admin panel*
-
- .. warning:: The ``Menu`` won't be visible until you add more than one ``Menu Item``, If you have 1, item, the item will be showed(but not under the menu).
-
-.. _oauth2_admin_panel_access_tokens:
-
-OAuth2 Access Tokens
-====================
-
-This small section won't cover entirely the GeoNode OAuth2 security integration, this is explained in detail in other sections of the documentation
-(refer to :ref:`oauth2_fixtures_and_migration` and :ref:`oauth2_tokens_and_sessions`).
-
-Here we will focus mainly on the :guilabel:`Admin > DJANGO/GEONODE OAUTH TOOLKIT` panel items with a specific attention to the ``Access tokens`` management.
-
-The :guilabel:`Admin > DJANGO/GEONODE OAUTH TOOLKIT` panel (as shown in the figure below) allows an admin to manage everything related to
-GeoNode OAuth2 grants and permissions.
-
-As better explained in other sections of the documentation, this is needed to correctly handle the communication between GeoNode and GeoServer.
-
-.. figure:: img/oauth2-tokens/admin-panel-tokens-0001.png
- :align: center
-
- *DJANGO/GEONODE OAUTH TOOLKIT Admin panel*
-
-Specifically from this panel an admin can create, delete or extend OAuth2 ``Access tokens``.
-
-The section :ref:`oauth2_tokens_and_sessions` better explains the concepts behind OAuth2 sessions; we want just to refresh the mind here
-about the basic concepts:
-
-* If the `SESSION_EXPIRED_CONTROL_ENABLED <../../basic/settings/index.html#session-expired-control-enabled>`_ setting is set to `True` (by default it is set to `True`)
- a registered user cannot login to neither GeoNode nor GeoServer without a valid ``Access token``.
-
-* When logging-in into GeoNode through the sign-up form, GeoNode checks if a valid ``Access token`` exists and it creates a new one if not, or extends
- the existing one if expired.
-
-* New ``Access tokens`` expire automatically after `ACCESS_TOKEN_EXPIRE_SECONDS <../../basic/settings/index.html#access-token-expire-seconds>`_ setting (by default 86400)
-
-* When an ``Access token`` expires, the user will be kicked out from the session and forced to login again
-
-Create a new token or extend an existing one
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-It is possible from the :guilabel:`Admin > DJANGO/GEONODE OAUTH TOOLKIT` panel to create a new ``Access token`` for a user.
-
-In order to do that, just click on the :guilabel:`Add` button beside ``Access tokens`` topic
-
-.. figure:: img/oauth2-tokens/admin-panel-tokens-0002.png
- :align: center
-
- *Add a new ``Access token``*
-
-On the new form
-
-.. figure:: img/oauth2-tokens/admin-panel-tokens-0003.png
- :align: center
-
- *Create an ``Access token``*
-
-select the followings:
-
-1. ``User``; use the search tool in order to select the correct user. The form want the user PK, which is a number, and **not** the username.
- The search tool will do everything for you.
-
- .. figure:: img/oauth2-tokens/admin-panel-tokens-0003a.png
- :align: center
-
- *Select a User*
-
-2. ``Source refresh token``; this is not mandatory, leave it blank.
-
-3. ``Token``; write here any alphanumeric string. This will be the ``access_token`` that the member can use to access the OWS services.
- We suggest to use a service like https://passwordsgenerator.net/ in order to generate a strong token string.
-
- .. figure:: img/oauth2-tokens/admin-panel-tokens-0003b.png
- :align: center
-
- *Select a Token*
-
-4. ``Application``; select **GeoServer**, this is mandatory
-
- .. figure:: img/oauth2-tokens/admin-panel-tokens-0003c.png
- :align: center
-
- *Select the GeoServer Application*
-
-5. ``Expires``; select an expiration date by using the :guilabel:`date-time` widgets.
-
- .. figure:: img/oauth2-tokens/admin-panel-tokens-0003d.png
- :align: center
-
- *Select the Token Expiration*
-
-6. ``Scope``; select **write**, this is mandatory.
-
- .. figure:: img/oauth2-tokens/admin-panel-tokens-0003e.png
- :align: center
-
- *Select the Application Scope*
-
-Do not forget to :guilabel:`Save`.
-
-From now on, GeoNode will use this ``Access Token`` to control the user session (notice that the user need to login again if closing the browser session),
-and the user will be able to access the OWS Services by using the new ``Access Token``, e.g.:
-
-.. code-block:: shell
-
- https://dev.geonode.geo-solutions.it/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities&access_token=123456
-
-
-Notice the ``...quest=GetCapabilities&access_token=123456`` (**access_token**) parameter at the end of the URL.
-
-Force a User Session to expire
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Everything said about the creation of a new ``Access Token``, applies to the deletion of the latter.
-
-From the same interface an admin can either select an expiration date or delete all the ``Access Tokens`` associated to a user, in order to
-force its session to expire.
-
-Remember that the user could activate another session by logging-in again on GeoNode with its credentials.
-
-In order to be sure the user won't force GeoNode to refresh the token, reset first its password or de-activate it.
diff --git a/admin/async/index.rst b/admin/async/index.rst
deleted file mode 100644
index 68564639..00000000
--- a/admin/async/index.rst
+++ /dev/null
@@ -1,83 +0,0 @@
-Supervisord and Systemd
-=======================
-
-Celery
-======
-
-Rabbitmq and Redis
-==================
-
-How to: Async Upload via API
-============================
-In geonode is possible to upload resources via API in async/sync way.
-
-Here is available a full example of upload via API
-https://github.com/GeoNode/geonode/blob/582d6efda74adb8042d1d897004bbf764e6e0285/geonode/upload/api/tests.py#L416
-
-Step 1
-------
-
-Create a common client session, this is foundamental due the fact that geonode will check the request session.
-For example with requests we will do something like:
-
-.. code-block:: python
-
- import requests
- client = requests.session()
-
-
-Note: in Django this part is already managed
-
-Step 2
-------
-
-Call the `api/v2/uploads/upload` endpoint in PUT (is a form-data endpoint) by specifing in files a dictionary with the names and the files that we want to uploads and a data payload with the required informations.
-For example:
-
-.. code-block:: python
-
- params = {
- "permissions": '{ "users": {"AnonymousUser": ["view_resourcebase"]} , "groups":{}}', # layer permissions
- "time": "false",
- "layer_title": "layer_title",
- "time": "false",
- "charset": "UTF-8",
- }
-
- files = {
- "filename": <_io.BufferedReader name="filename">
- }
-
- client.put(
- "http://localhost:8000/api/v2/uploads/upload/",
- auth=HTTPBasicAuth(username, password),
- data=params,
- files=files,
- )
-
- Returns:
- - dict with import id of the resource
-
-Step 3
-------
-
-Call in the final upload page in order to trigger the actual import.
-If correclty set, Geoserver will manage the upload asyncronously.
-
-.. code-block:: python
-
- client.get("http://localhost:8000/upload/final?id={import_id}")
-
- The `import_id` is returned from the previous step
-
-Step 4
-------
-
-The upload as been completed on GeoNode, we should check utill Geoserver has complete his part.
-To do so, is enougth to call the detailed information about the upload that we are performing
-
-.. code-block:: python
-
- client.get(f"http://localhost:8000/api/v2/uploads/{upload_id}")
-
-When the status is `PROCESSED` and the completion is `100%` we are able to see the resource in geonode and geoserver
\ No newline at end of file
diff --git a/admin/default_lang/index.rst b/admin/default_lang/index.rst
deleted file mode 100644
index aac839b2..00000000
--- a/admin/default_lang/index.rst
+++ /dev/null
@@ -1,80 +0,0 @@
-.. _default_language:
-
-Changing the Default Language
-=============================
-
-GeoNode's default language is English, but GeoNode users can change the interface language with the pulldown menu at the top-right of most GeoNode pages. Once a user selects a language GeoNode remembers that language for subsequent pages.
-
-GeoNode Configuration
-=====================
-
-As root edit the geonode config file :file:`/home/geonode/geonode/geonode/settings.py` (or :file:`/etc/geonode/settings.py` if GeoNode has been installed using **apt-get**) and change ``LANGUAGE_CODE`` to the desired default language.
-
-.. note:: A list of language codes can be found in the global django config file :file:`/usr/local/lib/python2.7/dist-packages/django/conf/global_settings.py` (or :file:`/var/lib/geonode/lib/python2.7/site-packages/django/conf/global_settings.py` if GeoNode has been installed using **apt-get**).
-
-For example, to make French the default language use::
-
- LANGUAGE_CODE = 'fr'
-
-Unfortunately Django overrides this setting, giving the language setting of a user's browser priority. For example, if ``LANGUAGE_CODE`` is set to French, but the user has configured their operating system for Spanish they may see the Spanish version when they first visit GeoNode.
-
-
-Additional Steps
-================
-
-If this is not the desired behaviour, and all users should initially see the default ``LANGUAGE_CODE``, regardless of their browser's settings, do the following steps to ensure Django ignores the browser language settings. (Users can always use the pulldown language menu to change the language at any time.)
-
-As **root** create a new directory within GeoNode's site packages
-
-.. code-block:: shell
-
- mkdir /usr/lib/python2.7/dist-packages/setmydefaultlanguage
-
-or
-
-.. code-block:: shell
-
- mkdir /var/lib/geonode/lib/python2.7/site-packages/setmydefaultlanguage
-
-if GeoNode has been installed using **apt-get**.
-
-As root create and edit a new file :file:`/usr/lib/python2.7/dist-packages/setmydefaultlanguage/__init__.py` and add the following lines
-
-.. code-block:: python
-
- class ForceDefaultLanguageMiddleware(object):
- """
- Ignore Accept-Language HTTP headers
-
- This will force the I18N machinery to always choose settings.LANGUAGE_CODE
- as the default initial language, unless another one is set via sessions or cookies
-
- Should be installed *before* any middleware that checks request.META['HTTP_ACCEPT_LANGUAGE'],
- namely django.middleware.locale.LocaleMiddleware
- """
- def process_request(self, request):
- if request.META.has_key('HTTP_ACCEPT_LANGUAGE'):
- del request.META['HTTP_ACCEPT_LANGUAGE']
-
-At the end of the GeoNode configuration file :file:`/home/geonode/geonode/geonode/settings.py` (or :file:`/etc/geonode/settings.py` if GeoNode has been installed using **apt-get**) add the following lines to ensure the above class is executed
-
-.. code-block:: python
-
- MIDDLEWARE_CLASSES += (
- 'setmydefaultlanguage.ForceDefaultLanguageMiddleware',
- )
-
-Restart
-=======
-
-You will need to restart GeoNode accordingly to the installation method you have choosen.
-
-As an instance in case you are using `NGINX` with `UWSGI`, as root you will need to run the following commands
-
-.. code-block:: shell
-
- service uwsgi restart
- service nginx restart
-
-
-Please refer to Translating GeoNode for information on editing GeoNode pages in different languages and create new GeoNode Translations.
diff --git a/admin/index.rst b/admin/index.rst
deleted file mode 100644
index 954638c9..00000000
--- a/admin/index.rst
+++ /dev/null
@@ -1,71 +0,0 @@
-GeoNode Admins Guide
-====================
-
-GeoNode has an administration panel, based on the Django admin, which can be used to do some database operations.
-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 available to you.
-It should be highlighted that the sections not covered in this guide are meant to be managed through GeoNode UI.
-
-.. toctree::
- :maxdepth: 3
-
- admin_panel/index
-
-GeoNode Management Commands
-===========================
-
-Management 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
-
- mgmt_commands/index
-
-Changing the default Languages
-==============================
-
-.. toctree::
- :caption: Changing the default Languages
- :maxdepth: 3
-
- default_lang/index
-
-GeoNode Upgrade from older versions
-===================================
-
-.. toctree::
- :caption: GeoNode Upgrade from older versions
- :maxdepth: 3
-
- upgrade/index
-
-GeoNode Async Signals
-=====================
-
-.. toctree::
- :caption: GeoNode Async Signals
- :maxdepth: 3
-
- async/index
-
-Managing thesauri
-=========================
-
-.. toctree::
- :maxdepth: 3
-
- thesaurus/index
diff --git a/admin/mgmt_commands/index.rst b/admin/mgmt_commands/index.rst
deleted file mode 100644
index bb4b7abe..00000000
--- a/admin/mgmt_commands/index.rst
+++ /dev/null
@@ -1,2352 +0,0 @@
-
-.. _migrate_baseurl:
-
-Migrate GeoNode Base URL
-========================
-
-The ``migrate_baseurl`` :guilabel:`Management Command` allows you to fix all the GeoNode Links whenever, for some reason,
-you need to change the :guilabel:`Domain Name` of :guilabel:`IP Address` of GeoNode.
-
-This **must** be used also in the cases you'll need to change the network schema from ``HTTP`` to ``HTTPS``, as an instance.
-
-First of all let's take a look at the :guilabel:`--help` option of the ``migrate_baseurl``
-management command in order to inspect all the command options and features.
-
-Run
-
-.. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py migrate_baseurl --help
-
-This will produce output that looks like the following
-
-.. code-block:: shell
-
- usage: manage.py migrate_baseurl [-h] [--version] [-v {0,1,2,3}]
- [--settings SETTINGS]
- [--pythonpath PYTHONPATH] [--traceback]
- [--no-color] [-f]
- [--source-address SOURCE_ADDRESS]
- [--target-address TARGET_ADDRESS]
-
- Migrate GeoNode VM Base URL
-
- optional arguments:
- -h, --help show this help message and exit
- --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.
- -f, --force Forces the execution without asking for confirmation.
- --source-address SOURCE_ADDRESS
- Source Address (the one currently on DB e.g.
- http://192.168.1.23)
- --target-address TARGET_ADDRESS
- Target Address (the one to be changed e.g. http://my-
- public.geonode.org)
-
-* **Example 1**: I want to move my GeoNode instance from ``http:\\127.0.0.1`` to ``http:\\example.org``
-
- .. warning:: Make always sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py migrate_baseurl --source-address=127.0.0.1 --target-address=example.org
-
-* **Example 2**: I want to move my GeoNode instance from ``http:\\example.org`` to ``https:\\example.org``
-
- .. warning:: Make always sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py migrate_baseurl --source-address=http:\\example.org --target-address=https:\\example.org
-
-* **Example 3**: I want to move my GeoNode instance from ``https:\\example.org`` to ``https:\\geonode.example.org``
-
- .. warning:: Make always sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py migrate_baseurl --source-address=example.org --target-address=geonode.example.org
-
-.. note:: After migrating the base URL, make sure to sanitize the links and catalog metadata also (:ref:`sync_layers_and_metadata`).
-
-.. _sync_layers_and_metadata:
-
-Update Permissions, Metadata, Legends and Download Links
-========================================================
-
-The following three utility :guilabel:`Management Commands`, allow to fixup:
-
-1. :guilabel:`Users/Groups Permissions` on :guilabel:`Datasets`; those will be refreshed and synchronized with the :guilabel:`GIS Server` ones also
-
-2. :guilabel:`Metadata`, :guilabel:`Legend` and :guilabel:`Download` links on :guilabel:`Datasets` and :guilabel:`Maps`
-
-3. Cleanup :guilabel:`Duplicated Links` and :guilabel:`Outdated Thumbnails`
-
-Management Command ``sync_geonode_datasets``
---------------------------------------------
-
-This command allows to sync already existing permissions on Datasets. In order to change/set Datasets' permissions refer to the section :ref:`batch_sync_permissions`
-
-The options are:
-
-* **filter**; Only update data the Dataset names that match the given filter.
-
-* **username**; Only update data owned by the specified username.
-
-* **updatepermissions**; Update the Dataset permissions; synchronize it back to the GeoSpatial Server.
- This option is also available from the :guilabel:`Layer Details` page.
-
-* **updateattributes**; Update the Dataset attributes; synchronize it back to the GeoSpatial Server.
- This option is also available from the :guilabel:`Layer Details` page.
-
-* **updatethumbnails**; Update the Dataset thumbnail.
- This option is also available from the :guilabel:`Layer Details` page.
-
-* **updatebbox**; Update the Dataset BBOX and LotLan BBOX.
- This option is also available from the :guilabel:`Layer Details` page.
-
-* **remove-duplicates**; Removes duplicated Links.
-
-First of all let's take a look at the :guilabel:`--help` option of the ``sync_geonode_datasets``
-management command in order to inspect all the command options and features.
-
-Run
-
-.. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py sync_geonode_datasets --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 sync_geonode_datasets --help
-
-This will produce output that looks like the following
-
-.. code-block:: shell
-
- usage: manage.py sync_geonode_datasets [-h] [--version] [-v {0,1,2,3}]
- [--settings SETTINGS]
- [--pythonpath PYTHONPATH] [--traceback]
- [--no-color] [-i] [-d] [-f FILTER]
- [-u USERNAME] [--updatepermissions]
- [--updatethumbnails] [--updateattributes][--updatebbox]
-
- Update the GeoNode Datasets: permissions (including GeoFence database),
- statistics, thumbnails
-
- optional arguments:
- -h, --help show this help message and exit
- --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.
- -i, --ignore-errors Stop after any errors are encountered.
- -d, --remove-duplicates
- Remove duplicates first.
- -f FILTER, --filter FILTER
- Only update data the Datasets that match the given
- filter.
- -u USERNAME, --username USERNAME
- Only update data owned by the specified username.
- --updatepermissions Update the Dataset permissions.
- --updatethumbnails Update the Dataset styles and thumbnails.
- --updateattributes Update the Dataset attributes.
- --updatebbox Update the Dataset BBOX.
-
-* **Example 1**: I want to update/sync all Datasets permissions and attributes with the GeoSpatial Server
-
- .. warning:: Make always sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py sync_geonode_datasets --updatepermissions --updateattributes
-
-* **Example 2**: I want to regenerate the Thumbnails of all the Datasets belonging to ``afabiani``
-
- .. warning:: Make always sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py sync_geonode_datasets -u afabiani --updatethumbnails
-
-Management Command ``sync_geonode_maps``
-----------------------------------------
-
-This command is basically similar to the previous one, but affects the :guilabel:`Maps`; with some limitations.
-
-The options are:
-
-* **filter**; Only update data the maps titles that match the given filter.
-
-* **username**; Only update data owned by the specified username.
-
-* **updatethumbnails**; Update the map styles and thumbnails.
- This option is also available from the :guilabel:`Map Details` page.
-
-* **remove-duplicates**; Removes duplicated Links.
-
-First of all let's take a look at the :guilabel:`--help` option of the ``sync_geonode_maps``
-management command in order to inspect all the command options and features.
-
-Run
-
-.. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py sync_geonode_maps --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 sync_geonode_maps --help
-
-This will produce output that looks like the following
-
-.. code-block:: shell
-
- usage: manage.py sync_geonode_maps [-h] [--version] [-v {0,1,2,3}]
- [--settings SETTINGS]
- [--pythonpath PYTHONPATH] [--traceback]
- [--no-color] [-i] [-d] [-f FILTER]
- [-u USERNAME] [--updatethumbnails]
-
- Update the GeoNode maps: permissions, thumbnails
-
- optional arguments:
- -h, --help show this help message and exit
- --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.
- -i, --ignore-errors Stop after any errors are encountered.
- -d, --remove-duplicates
- Remove duplicates first.
- -f FILTER, --filter FILTER
- Only update data the maps that match the given filter.
- -u USERNAME, --username USERNAME
- Only update data owned by the specified username.
- --updatethumbnails Update the map styles and thumbnails.
-
-* **Example 1**: I want to regenerate the Thumbnail of the Map ``This is a test Map``
-
- .. warning:: Make always sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py sync_geonode_maps --updatethumbnails -f 'This is a test Map'
-
-Management Command ``set_all_datasets_metadata``
-----------------------------------------------
-
-This command allows to reset **Metadata Attributes** and **Catalogue Schema** on Datasets. The command will also update the :guilabel:`CSW Catalogue` XML and Links of GeoNode.
-
-The options are:
-
-* **filter**; Only update data the Datasets that match the given filter.
-
-* **username**; Only update data owned by the specified username.
-
-* **remove-duplicates**; Update the map styles and thumbnails.
-
-* **delete-orphaned-thumbs**; Removes duplicated Links.
-*
-* **set-uuid**; will refresh the UUID based on the UUID_HANDLER if configured (Default False).
-*
-* **set_attrib**; If set will refresh the attributes of the resource taken from Geoserver. (Default True).
-*
-* **set_links**; If set will refresh the links of the resource. (Default True).
-
-First of all let's take a look at the :guilabel:`--help` option of the ``set_all_datasets_metadata``
-management command in order to inspect all the command options and features.
-
-Run
-
-.. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py set_all_datasets_metadata --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 set_all_datasets_metadata --help
-
-This will produce output that looks like the following
-
-.. code-block:: shell
-
- usage: manage.py set_all_datasets_metadata [-h] [--version] [-v {0,1,2,3}]
- [--settings SETTINGS]
- [--pythonpath PYTHONPATH]
- [--traceback] [--no-color] [-i] [-d]
- [-t] [-f FILTER] [-u USERNAME]
-
- Resets Metadata Attributes and Schema to All Datasets
-
- optional arguments:
- -h, --help show this help message and exit
- --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.
- -i, --ignore-errors Stop after any errors are encountered.
- -d, --remove-duplicates
- Remove duplicates first.
- -t, --delete-orphaned-thumbs
- Delete Orphaned Thumbnails.
- -f FILTER, --filter FILTER
- Only update data the Datasets that match the given
- filter
- -u USERNAME, --username USERNAME
- Only update data owned by the specified username
-
-* **Example 1**: After having changed the Base URL, I want to regenerate all the Catalogue Schema and eventually remove all duplicates.
-
- .. warning:: Make always sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py set_all_datasets_metadata -d
-
-Management Command ``regenerate_xml``
-----------------------------------------------
-
-The command will regenerate the :guilabel:`CSW Catalogue` XML metadata files.
-
-The main options are:
-
-* **layer**; Only process specified layers.
-
-* **dry-run**; Do not actually perform any change.
-
-When run with the :guilabel:`--help` option the full list of available options will be presented.
-
-.. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py regenerate_xml --help
-
-This will produce the following output:
-
-.. code-block:: shell
-
- usage: manage.py regenerate_xml [-h] [-l LAYERS] [--skip-logger-setup] [-d] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] [--force-color]
- [--skip-checks]
-
- Re-create XML metadata documents
-
- options:
- -h, --help show this help message and exit
- -l LAYERS, --layer LAYERS
- Only process specified layers
- --skip-logger-setup Skips setup of the "geonode.br" logger, "br" handler and "br" format if not present in settings
- -d, --dry-run Do not actually perform any change
- --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.
-
-* **Example**:
-
- .. warning:: Make sure you are using the **correct** settings
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py regenerate_xml -d
-
-
-.. _load_data_into_geonode:
-
-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.
-For instance:
-
-* The dataset is too big to be uploaded through a web interface.
-
-* Import data from a mass storage programmatically.
-
-* 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.
-
-.. warning:: Some parts of this section have been taken from the `GeoServer `_ project and training documentation.
-
-.. _importlayers:
-
-Management Command ``importlayers``
------------------------------------
-
-The ``geonode.geoserver`` Django app includes 2 management commands that you can use to
-load data in your GeoNode.
-
-Both of them can be invoked by using the ``manage.py`` script.
-
-First of all let's take a look at the :guilabel:`--help` option of the ``importlayers``
-management command in order to inspect all the command options and features.
-
-Run
-
-.. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py importlayers --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 importlayers --help
-
-This will produce output that looks like the following
-
-.. code-block:: shell
-
- usage: manage.py importlayers [-h] [-hh HOST] [-u USERNAME] [-p PASSWORD]
- [--version] [-v {0,1,2,3}] [--settings SETTINGS]
- [--pythonpath PYTHONPATH] [--traceback] [--no-color]
- [--force-color] [--skip-checks]
- [path [path ...]]
-
- 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:
- path path [path...]
-
- optional arguments:
- -h, --help show this help message and exit
- --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".
- -hh HOST, --host HOST
- Geonode host url
- -u USERNAME, --username USERNAME
- Geonode username
- -p PASSWORD, --password PASSWORD
- Geonode password
-
-While the description of most of the options should be self explanatory, its worth
-reviewing some of the key options a bit more in details.
-
-- The :guilabel:`-hh` Identifies the GeoNode server where we want to upload our Datasets. The default value is :guilabel:`http://localhost:8000`.
-- The :guilabel:`-u` Identifies the username for the login. The default value is :guilabel:`admin`.
-- The :guilabel:`-p` Identifies the password for the login. The default value is :guilabel:`admin`.
-
-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 a directory to your own shapefiles.
-
-.. code-block:: shell
- First let's run the GeoNode server:
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py runserver
-
- Then let's import the files:
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py importlayers /home/user/.virtualenvs/geonode/lib/python3.8/site-packages/gisdata/data/good/vector/
-
-This command will produce the following output to your terminal
-
-.. code-block:: shell
-
- san_andres_y_providencia_poi.shp: 201
- san_andres_y_providencia_location.shp: 201
- san_andres_y_providencia_administrative.shp: 201
- san_andres_y_providencia_coastline.shp: 201
- san_andres_y_providencia_highway.shp: 201
- single_point.shp: 201
- san_andres_y_providencia_water.shp: 201
- san_andres_y_providencia_natural.shp: 201
-
- 1.7456605294117646 seconds per Dataset
-
- Output data: {
- "success": [
- "san_andres_y_providencia_poi.shp",
- "san_andres_y_providencia_location.shp",
- "san_andres_y_providencia_administrative.shp",
- "san_andres_y_providencia_coastline.shp",
- "san_andres_y_providencia_highway.shp",
- "single_point.shp",
- "san_andres_y_providencia_water.shp",
- "san_andres_y_providencia_natural.shp"
- ],
- "errors": []
- }
-
-As output the command will print:
-
-.. code-block:: shell
- layer_name: status code for each Layer
-
- upload_time spent of each Dataset
-
- A json with the representation of the Datasets uploaded or with some errors.
-
-The status code, is the response coming from GeoNode. For example 201 means that the Dataset has been correctly uploaded
-
-If you encounter errors while running this command, please check the GeoNode logs for more information.
-
-.. _updatelayers:
-
-Management Command ``updatelayers``
------------------------------------
-
-While it is possible to import Datasets directly from your servers filesystem into your
-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, 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 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:
-
-- https://docs.geoserver.org/latest/en/user/data/vector/index.html
-- https://docs.geoserver.org/latest/en/user/data/raster/index.html
-- https://docs.geoserver.org/latest/en/user/data/database/index.html
-- https://docs.geoserver.org/latest/en/user/data/cascaded/index.html
-
-.. note:: Some of these raster or vector formats or database types require that you install specific plugins in your GeoServer in order to use the. Please consult the GeoServer documentation for more information.
-
-Data from a PostGIS database
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Lets walk through an example of configuring a new PostGIS database in GeoServer and then
-configuring those Datasets in your GeoNode.
-
-First visit the GeoServer administration interface on your server. This is usually on port 8080 and is available at http://localhost:8080/geoserver/web/
-
-1. You should login with the superuser credentials you setup when you first configured your GeoNode instance.
-
- Once you are logged in to the GeoServer Admin interface, you should see the following.
-
- .. figure:: img/geoserver_admin.png
- :align: center
-
- .. note:: The number of stores, Datasets and workspaces may be different depending on what you already have configured in your GeoServer.
-
-2. Next you want to select the "Stores" option in the left hand menu, and then the "Add new Store" option. The following screen will be displayed.
-
- .. figure:: img/geoserver_new_store.png
- :align: center
-
-3. In this case, we want to select the PostGIS store type to create a connection to our existing database. On the next screen you will need to enter the parameters to connect to your PostGIS database (alter as necessary for your own database).
-
- .. figure:: img/geoserver_postgis_params.png
- :align: center
-
- .. note:: If you are unsure about any of the settings, leave them as the default.
-
-4. The next screen lets you configure the Datasets in your database. This will of course be different depending on the Datasets in your database.
-
- .. figure:: img/geoserver_publish_layers.png
- :align: center
-
-5. Select the "Publish" button for one of the Datasets and the next screen will be displayed where you can enter metadata for this Dataset. Since we will be managing this metadata in GeoNode, we can leave these alone for now.
-
- .. figure:: img/geoserver_layer_params.png
- :align: center
-
-6. The things that *must* be specified are the Declared SRS and you must select the "Compute from Data" and "Compute from native bounds" links after the SRS is specified.
-
- .. figure:: img/geoserver_srs.png
- :align: center
-
- .. figure:: img/geoserver_srs_2.png
- :align: center
-
-7. Click save and this Dataset will now be configured for use in your GeoServer.
-
- .. figure:: img/geoserver_layers.png
- :align: center
-
-8. The next step is to configure these Datasets in GeoNode. The ``updatelayers`` management command can be used for this purpose. As with ``importlayers``, it's useful to look at the command line options for this command by passing the :guilabel:`--help` option
-
- Run
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py updatelayers --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 updatelayers --help
-
- This will produce output that looks like the following
-
- .. code-block:: shell
-
- usage: manage.py updatelayers [-h] [--version] [-v {0,1,2,3}]
- [--settings SETTINGS] [--pythonpath PYTHONPATH]
- [--traceback] [--no-color] [-i]
- [--skip-unadvertised]
- [--skip-geonode-registered] [--remove-deleted]
- [-u USER] [-f FILTER] [-s STORE] [-w WORKSPACE]
- [-p PERMISSIONS]
-
- Update the GeoNode application with data from GeoServer
-
- optional arguments:
- -h, --help show this help message and exit
- --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.
- -i, --ignore-errors Stop after any errors are encountered.
- --skip-unadvertised Skip processing unadvertised Datasets from GeoSever.
- --skip-geonode-registered
- Just processing GeoServer Datasets still not registered
- in GeoNode.
- --remove-deleted Remove GeoNode Datasets that have been deleted from
- GeoSever.
- -u USER, --user USER Name of the user account which should own the imported
- Datasets
- -f FILTER, --filter FILTER
- Only update data the Datasets that match the given
- filter
- -s STORE, --store STORE
- Only update data the Datasets for the given geoserver
- store name
- -w WORKSPACE, --workspace WORKSPACE
- Only update data on specified workspace
- -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.
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py updatelayers -w geonode -f _1_SARMIENTO_ENERO_2018
-
- .. code-block:: shell
-
- Inspecting the available Datasets in GeoServer ...
- Found 1 Datasets, starting processing
- /usr/local/lib/python2.7/site-packages/owslib/iso.py:117: FutureWarning: the .identification and .serviceidentification properties will merge into .identification being a list of properties. This is currently implemented in .identificationinfo. Please see https://github.com/geopython/OWSLib/issues/38 for more information
- FutureWarning)
- /usr/local/lib/python2.7/site-packages/owslib/iso.py:495: FutureWarning: The .keywords and .keywords2 properties will merge into the .keywords property in the future, with .keywords becoming a list of MD_Keywords instances. This is currently implemented in .keywords2. Please see https://github.com/geopython/OWSLib/issues/301 for more information
- FutureWarning)
- Content-Type: text/html; charset="utf-8"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Subject: [master.demo.geonode.org] A new Dataset has been uploaded
- From: webmaster@localhost
- To: mapadeldelito@chubut.gov.ar
- Reply-To: webmaster@localhost
- Date: Tue, 08 Oct 2019 12:26:17 -0000
- Message-ID: <20191008122617.28801.94967@d3cf85425231>
-
-
-
- You have received the following notice from master.demo.geonode.org:
-
-
- The user admin uploaded the following Dataset:
- _1_SARMIENTO_ENERO_2018
- You can visit the Dataset's detail page here: http://master.demo.geonode.org/Datasets/geonode:_1_SARMIENTO_ENERO_2018
-
-
-
- To change how you receive notifications, please go to http://master.demo.geonode.org
-
-
-
- -------------------------------------------------------------------------------
- Content-Type: text/html; charset="utf-8"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Subject: [master.demo.geonode.org] A new Dataset has been uploaded
- From: webmaster@localhost
- To: giacomo8vinci@gmail.com
- Reply-To: webmaster@localhost
- Date: Tue, 08 Oct 2019 12:26:17 -0000
- Message-ID: <20191008122617.28801.53784@d3cf85425231>
-
-
-
- You have received the following notice from master.demo.geonode.org:
-
-
- The user admin uploaded the following Dataset:
- _1_SARMIENTO_ENERO_2018
- You can visit the Dataset's detail page here: http://master.demo.geonode.org/Datasets/geonode:_1_SARMIENTO_ENERO_2018
-
-
-
- To change how you receive notifications, please go to http://master.demo.geonode.org
-
-
-
- -------------------------------------------------------------------------------
- Content-Type: text/html; charset="utf-8"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Subject: [master.demo.geonode.org] A new Dataset has been uploaded
- From: webmaster@localhost
- To: fmgagliano@gmail.com
- Reply-To: webmaster@localhost
- Date: Tue, 08 Oct 2019 12:26:17 -0000
- Message-ID: <20191008122617.28801.26265@d3cf85425231>
-
-
-
- You have received the following notice from master.demo.geonode.org:
-
-
- The user admin uploaded the following Dataset:
- _1_SARMIENTO_ENERO_2018
- You can visit the Dataset's detail page here: http://master.demo.geonode.org/Datasets/geonode:_1_SARMIENTO_ENERO_2018
-
-
-
- To change how you receive notifications, please go to http://master.demo.geonode.org
-
-
-
- -------------------------------------------------------------------------------
- Found geoserver resource for this Dataset: _1_SARMIENTO_ENERO_2018
- ... Creating Default Resource Links for Layer [geonode:_1_SARMIENTO_ENERO_2018]
- -- Resource Links[Prune old links]...
- -- Resource Links[Prune old links]...done!
- -- Resource Links[Compute parameters for the new links]...
- -- Resource Links[Create Raw Data download link]...
- -- Resource Links[Create Raw Data download link]...done!
- -- Resource Links[Set download links for WMS, WCS or WFS and KML]...
- -- Resource Links[Set download links for WMS, WCS or WFS and KML]...done!
- -- Resource Links[Legend link]...
- -- Resource Links[Legend link]...done!
- -- Resource Links[Thumbnail link]...
- -- Resource Links[Thumbnail link]...done!
- -- Resource Links[OWS Links]...
- -- Resource Links[OWS Links]...done!
- Content-Type: text/html; charset="utf-8"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Subject: [master.demo.geonode.org] A Dataset has been updated
- From: webmaster@localhost
- To: mapadeldelito@chubut.gov.ar
- Reply-To: webmaster@localhost
- Date: Tue, 08 Oct 2019 12:26:20 -0000
- Message-ID: <20191008122620.28801.81598@d3cf85425231>
-
-
-
- You have received the following notice from master.demo.geonode.org:
-
-
- The following Dataset was updated:
- _1_SARMIENTO_ENERO_2018, owned by admin
- You can visit the Dataset's detail page here: http://master.demo.geonode.org/Datasets/geonode:_1_SARMIENTO_ENERO_2018
-
-
-
- To change how you receive notifications, please go to http://master.demo.geonode.org
-
-
-
- -------------------------------------------------------------------------------
- Content-Type: text/html; charset="utf-8"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Subject: [master.demo.geonode.org] A Dataset has been updated
- From: webmaster@localhost
- To: giacomo8vinci@gmail.com
- Reply-To: webmaster@localhost
- Date: Tue, 08 Oct 2019 12:26:20 -0000
- Message-ID: <20191008122620.28801.93778@d3cf85425231>
-
-
-
- You have received the following notice from master.demo.geonode.org:
-
-
- The following Dataset was updated:
- _1_SARMIENTO_ENERO_2018, owned by admin
- You can visit the Dataset's detail page here: http://master.demo.geonode.org/Datasets/geonode:_1_SARMIENTO_ENERO_2018
-
-
-
- To change how you receive notifications, please go to http://master.demo.geonode.org
-
-
-
- -------------------------------------------------------------------------------
- Content-Type: text/html; charset="utf-8"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Subject: [master.demo.geonode.org] A Dataset has been updated
- From: webmaster@localhost
- To: fmgagliano@gmail.com
- Reply-To: webmaster@localhost
- Date: Tue, 08 Oct 2019 12:26:20 -0000
- Message-ID: <20191008122620.28801.58585@d3cf85425231>
-
-
-
- You have received the following notice from master.demo.geonode.org:
-
-
- The following Dataset was updated:
- _1_SARMIENTO_ENERO_2018, owned by admin
- You can visit the Dataset's detail page here: http://master.demo.geonode.org/Datasets/geonode:_1_SARMIENTO_ENERO_2018
-
-
-
- To change how you receive notifications, please go to http://master.demo.geonode.org
-
-
-
- -------------------------------------------------------------------------------
- Found geoserver resource for this Dataset: _1_SARMIENTO_ENERO_2018
- /usr/local/lib/python2.7/site-packages/geoserver/style.py:80: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
- if not user_style:
- /usr/local/lib/python2.7/site-packages/geoserver/style.py:84: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
- if user_style:
- ... Creating Default Resource Links for Layer [geonode:_1_SARMIENTO_ENERO_2018]
- -- Resource Links[Prune old links]...
- -- Resource Links[Prune old links]...done!
- -- Resource Links[Compute parameters for the new links]...
- -- Resource Links[Create Raw Data download link]...
- -- Resource Links[Create Raw Data download link]...done!
- -- Resource Links[Set download links for WMS, WCS or WFS and KML]...
- -- Resource Links[Set download links for WMS, WCS or WFS and KML]...done!
- -- Resource Links[Legend link]...
- -- Resource Links[Legend link]...done!
- -- Resource Links[Thumbnail link]...
- -- Resource Links[Thumbnail link]...done!
- -- Resource Links[OWS Links]...
- -- Resource Links[OWS Links]...done!
- [created] Layer _1_SARMIENTO_ENERO_2018 (1/1)
-
-
- Finished processing 1 Datasets in 5.0 seconds.
-
- 1 Created Datasets
- 0 Updated Datasets
- 0 Failed Datasets
- 5.000000 seconds per Dataset
-
-.. 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!
-
-.. _gdal_ogr_data_processing:
-
-Using ``GDAL`` and ``OGR`` to convert your Data for use in GeoNode
-------------------------------------------------------------------
-
-GeoNode supports uploading data in :guilabel:`ESRI shapefiles`, :guilabel:`GeoTIFF`, :guilabel:`CSV`, :guilabel:`GeoJSON`, :guilabel:`ASCII-GRID` and :guilabel:`KML / KMZ` formats (for the last three formats only if you are using the ``geonode.importer`` backend).
-
-* If your data is in other formats, you will need to convert it into one of these formats for use in GeoNode.
-
-* If your :guilabel:`Raster` data is not correctly processed, it might be almost unusable with GeoServer and GeoNode. You will need to process it using `GDAL`.
-
-You need to make sure that you have the GDAL library installed on your system.
-On Ubuntu you can install this package with the following command:
-
-.. code-block:: shell
-
- sudo apt-get install gdal-bin
-
-OGR (Vector Data)
-^^^^^^^^^^^^^^^^^
-
-OGR is used to manipulate vector data. In this example, we will use MapInfo .tab files and convert them to shapefiles with the ogr2ogr command. We will use sample MapInfo files from the website linked below.
-
-http://services.land.vic.gov.au/landchannel/content/help?name=sampledata
-
-You can download the Admin;(Postcode) Dataset by issuing the following command::
-
- $ wget http://services.land.vic.gov.au/sampledata/shape/admin_postcode_vm.zip
-
-You will need to unzip this dataset by issuing the following command::
-
- $ unzip admin_postcode_vm.zip
-
-This will leave you with the following files in the directory where you executed the above commands::
-
- |-- ANZVI0803003025.htm
- |-- DSE_Data_Access_Licence.pdf
- |-- VMADMIN.POSTCODE_POLYGON.xml
- |-- admin_postcode_vm.zip
- --- vicgrid94
- --- mif
- --- lga_polygon
- --- macedon\ ranges
- |-- EXTRACT_POLYGON.mid
- |-- EXTRACT_POLYGON.mif
- --- VMADMIN
- |-- POSTCODE_POLYGON.mid
- --- POSTCODE_POLYGON.mif
-
-First, lets inspect this file set using the following command::
-
- $ ogrinfo -so vicgrid94/mif/lga_polygon/macedon\ ranges/VMADMIN/POSTCODE_POLYGON.mid POSTCODE_POLYGON
-
-The output will look like the following::
-
- Had to open data source read-only.
- INFO: Open of `vicgrid94/mif/lga_polygon/macedon ranges/VMADMIN/POSTCODE_POLYGON.mid'
- using driver `MapInfo File' successful.
-
- Layer name: POSTCODE_POLYGON
- Geometry: 3D Unknown (any)
- Feature Count: 26
- Extent: (2413931.249367, 2400162.366186) - (2508952.174431, 2512183.046927)
- Layer SRS WKT:
- PROJCS["unnamed",
- GEOGCS["unnamed",
- DATUM["GDA94",
- SPHEROID["GRS 80",6378137,298.257222101],
- TOWGS84[0,0,0,-0,-0,-0,0]],
- PRIMEM["Greenwich",0],
- UNIT["degree",0.0174532925199433]],
- PROJECTION["Lambert_Conformal_Conic_2SP"],
- PARAMETER["standard_parallel_1",-36],
- PARAMETER["standard_parallel_2",-38],
- PARAMETER["latitude_of_origin",-37],
- PARAMETER["central_meridian",145],
- PARAMETER["false_easting",2500000],
- PARAMETER["false_northing",2500000],
- UNIT["Meter",1]]
- PFI: String (10.0)
- POSTCODE: String (4.0)
- FEATURE_TYPE: String (6.0)
- FEATURE_QUALITY_ID: String (20.0)
- PFI_CREATED: Date (10.0)
- UFI: Real (12.0)
- UFI_CREATED: Date (10.0)
- UFI_OLD: Real (12.0)
-
-This gives you information about the number of features, the extent, the projection and the attributes of this Dataset.
-
-Next, lets go ahead and convert this Dataset into a shapefile by issuing the following command::
-
- $ ogr2ogr -t_srs EPSG:4326 postcode_polygon.shp vicgrid94/mif/lga_polygon/macedon\ ranges/VMADMIN/POSTCODE_POLYGON.mid POSTCODE_POLYGON
-
-Note that we have also reprojected the Dataset to the WGS84 spatial reference system with the -t_srs ogr2ogr option.
-
-The output of this command will look like the following::
-
- Warning 6: Normalized/laundered field name: 'FEATURE_TYPE' to 'FEATURE_TY'
- Warning 6: Normalized/laundered field name: 'FEATURE_QUALITY_ID' to 'FEATURE_QU'
- Warning 6: Normalized/laundered field name: 'PFI_CREATED' to 'PFI_CREATE'
- Warning 6: Normalized/laundered field name: 'UFI_CREATED' to 'UFI_CREATE'
-
-This output indicates that some of the field names were truncated to fit into the constraint that attributes in shapefiles are only 10 characters long.
-
-You will now have a set of files that make up the postcode_polygon.shp shapefile set. We can inspect them by issuing the following command::
-
- $ ogrinfo -so postcode_polygon.shp postcode_polygon
-
-The output will look similar to the output we saw above when we inspected the MapInfo file we converted from::
-
- INFO: Open of `postcode_polygon.shp'
- using driver `ESRI Shapefile' successful.
-
- Layer name: postcode_polygon
- Geometry: Polygon
- Feature Count: 26
- Extent: (144.030296, -37.898156) - (145.101137, -36.888878)
- Layer SRS WKT:
- GEOGCS["GCS_WGS_1984",
- DATUM["WGS_1984",
- SPHEROID["WGS_84",6378137,298.257223563]],
- PRIMEM["Greenwich",0],
- UNIT["Degree",0.017453292519943295]]
- PFI: String (10.0)
- POSTCODE: String (4.0)
- FEATURE_TY: String (6.0)
- FEATURE_QU: String (20.0)
- PFI_CREATE: Date (10.0)
- UFI: Real (12.0)
- UFI_CREATE: Date (10.0)
- UFI_OLD: Real (12.0)
-
-These files can now be loaded into your GeoNode instance via the normal uploader.
-
-Visit the upload page in your GeoNode, drag and drop the files that composes the shapefile that you have generated using the GDAL ogr2ogr command (postcode_polygon.dbf, postcode_polygon.prj, postcode_polygon.shp, postcode_polygon.shx). Give the permissions as needed and then click the "Upload files" button.
-
-.. figure:: img/upload_shapefile.png
- :align: center
-
-As soon as the import process completes, you will have the possibility to go straight to the Dataset info page ("Layer Info" button), or to edit the metadata for that Dataset ("Edit Metadata" button), or to manage the styles for that Dataset ("Manage Styles").
-
-.. figure:: img/layer_info_vector.png
- :align: center
-
-GDAL (Raster Data)
-^^^^^^^^^^^^^^^^^^
-
-Let's see several examples on how to either convert raster data into different formats and/or process it to get the best performances.
-
-References:
-
-a) https://geoserver.geo-solutions.it/edu/en/raster_data/processing.html
-
-b) https://geoserver.geo-solutions.it/edu/en/raster_data/advanced_gdal/
-
-Raster Data Conversion: Arc/Info Binary and ASCII Grid data into GeoTIFF format.
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Let's assume we have a sample ASCII Grid file compressed as an archive.
-
-.. code-block:: shell
-
- # Un-tar the files
- tar -xvf sample_asc.tar
-
-You will be left with the following files on your filesystem:
-
-.. code-block:: shell
-
- |-- batemans_ele
- | |-- dblbnd.adf
- | |-- hdr.adf
- | |-- metadata.xml
- | |-- prj.adf
- | |-- sta.adf
- | |-- w001001.adf
- | |-- w001001x.adf
- |-- batemans_elevation.asc
-
-The file ``batemans_elevation.asc`` is an Arc/Info ASCII Grid file and the files in
-the batemans_ele directory are an Arc/Info Binary Grid file.
-
-You can use the ``gdalinfo`` command to inspect both of these files by executing the
-following command:
-
-.. code-block:: shell
-
- gdalinfo batemans_elevation.asc
-
-The output should look like the following:
-
-.. code-block:: shell
-
- Driver: AAIGrid/Arc/Info ASCII Grid
- Files: batemans_elevation.asc
- Size is 155, 142
- Coordinate System is `'
- Origin = (239681.000000000000000,6050551.000000000000000)
- Pixel Size = (100.000000000000000,-100.000000000000000)
- Corner Coordinates:
- Upper Left ( 239681.000, 6050551.000)
- Lower Left ( 239681.000, 6036351.000)
- Upper Right ( 255181.000, 6050551.000)
- Lower Right ( 255181.000, 6036351.000)
- Center ( 247431.000, 6043451.000)
- Band 1 Block=155x1 Type=Float32, ColorInterp=Undefined
- NoData Value=-9999
-
-You can then inspect the batemans_ele files by executing the following command:
-
-.. code-block:: shell
-
- gdalinfo batemans_ele
-
-And this should be the corresponding output:
-
-.. code-block:: shell
-
- Driver: AIG/Arc/Info Binary Grid
- Files: batemans_ele
- batemans_ele/dblbnd.adf
- batemans_ele/hdr.adf
- batemans_ele/metadata.xml
- batemans_ele/prj.adf
- batemans_ele/sta.adf
- batemans_ele/w001001.adf
- batemans_ele/w001001x.adf
- Size is 155, 142
- Coordinate System is:
- PROJCS["unnamed",
- GEOGCS["GDA94",
- DATUM["Geocentric_Datum_of_Australia_1994",
- SPHEROID["GRS 1980",6378137,298.257222101,
- AUTHORITY["EPSG","7019"]],
- TOWGS84[0,0,0,0,0,0,0],
- AUTHORITY["EPSG","6283"]],
- PRIMEM["Greenwich",0,
- AUTHORITY["EPSG","8901"]],
- UNIT["degree",0.0174532925199433,
- AUTHORITY["EPSG","9122"]],
- AUTHORITY["EPSG","4283"]],
- PROJECTION["Transverse_Mercator"],
- PARAMETER["latitude_of_origin",0],
- PARAMETER["central_meridian",153],
- PARAMETER["scale_factor",0.9996],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",10000000],
- UNIT["METERS",1]]
- Origin = (239681.000000000000000,6050551.000000000000000)
- Pixel Size = (100.000000000000000,-100.000000000000000)
- Corner Coordinates:
- Upper Left ( 239681.000, 6050551.000) (150d 7'28.35"E, 35d39'16.56"S)
- Lower Left ( 239681.000, 6036351.000) (150d 7'11.78"E, 35d46'56.89"S)
- Upper Right ( 255181.000, 6050551.000) (150d17'44.07"E, 35d39'30.83"S)
- Lower Right ( 255181.000, 6036351.000) (150d17'28.49"E, 35d47'11.23"S)
- Center ( 247431.000, 6043451.000) (150d12'28.17"E, 35d43'13.99"S)
- Band 1 Block=256x4 Type=Float32, ColorInterp=Undefined
- Min=-62.102 Max=142.917
- NoData Value=-3.4028234663852886e+38
-
-You will notice that the ``batemans_elevation.asc`` file does *not* contain projection information while the ``batemans_ele`` file does.
-Because of this, let's use the ``batemans_ele`` files for this exercise and convert them to a GeoTiff for use in GeoNode.
-We will also reproject this file into WGS84 in the process. This can be accomplished with the following command.
-
-.. code-block:: shell
-
- gdalwarp -t_srs EPSG:4326 batemans_ele batemans_ele.tif
-
-The output will show you the progress of the conversion and when it is complete,
-you will be left with a ``batemans_ele.tif`` file that you can upload to your GeoNode.
-
-You can inspect this file with the gdalinfo command:
-
-.. code-block:: shell
-
- gdalinfo batemans_ele.tif
-
-Which will produce the following output:
-
-.. code-block:: shell
-
- Driver: GTiff/GeoTIFF
- Files: batemans_ele.tif
- Size is 174, 130
- Coordinate System is:
- GEOGCS["WGS 84",
- DATUM["WGS_1984",
- SPHEROID["WGS 84",6378137,298.257223563,
- AUTHORITY["EPSG","7030"]],
- AUTHORITY["EPSG","6326"]],
- PRIMEM["Greenwich",0],
- UNIT["degree",0.0174532925199433],
- AUTHORITY["EPSG","4326"]]
- Origin = (150.119938943722502,-35.654598806259330)
- Pixel Size = (0.001011114155919,-0.001011114155919)
- Metadata:
- AREA_OR_POINT=Area
- Image Structure Metadata:
- INTERLEAVE=BAND
- Corner Coordinates:
- Upper Left ( 150.1199389, -35.6545988) (150d 7'11.78"E, 35d39'16.56"S)
- Lower Left ( 150.1199389, -35.7860436) (150d 7'11.78"E, 35d47' 9.76"S)
- Upper Right ( 150.2958728, -35.6545988) (150d17'45.14"E, 35d39'16.56"S)
- Lower Right ( 150.2958728, -35.7860436) (150d17'45.14"E, 35d47' 9.76"S)
- Center ( 150.2079059, -35.7203212) (150d12'28.46"E, 35d43'13.16"S)
- Band 1 Block=174x11 Type=Float32, ColorInterp=Gray
-
-Raster Data Optimization: Optimizing and serving big raster data
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-(ref: https://geoserver.geo-solutions.it/edu/en/raster_data/advanced_gdal/example5.html)
-
-When dealing with big raster datasets it could be very useful to use tiles.
-
-Tiling allows large raster datasets to be broken-up into manageable pieces and are fundamental
-in defining and implementing a higher level raster I/O interface.
-
-In this example we will use the original dataset of the ``chiangMai_ortho_optimized`` public raster Dataset which
-is currently available on the Thai `CHIANG MAI Urban Flooding GeoNode platform `_.
-
-This dataset contains an orthorectified image stored as RGBa GeoTiff with 4 bands,
-three bands for the RGB and one for transparency (the alpha channel).
-
-Calling the gdalinfo command to see detailed information:
-
-.. code-block:: shell
-
- gdalinfo chiangMai_ortho.tif
-
-It will produce the following results:
-
-.. code-block:: shell
-
- Driver: GTiff/GeoTIFF
- Files: chiangMai_ortho.tif
- Size is 63203, 66211
- Coordinate System is:
- PROJCS["WGS 84 / UTM zone 47N",
- GEOGCS["WGS 84",
- DATUM["WGS_1984",
- SPHEROID["WGS 84",6378137,298.257223563,
- AUTHORITY["EPSG","7030"]],
- AUTHORITY["EPSG","6326"]],
- PRIMEM["Greenwich",0,
- AUTHORITY["EPSG","8901"]],
- UNIT["degree",0.0174532925199433,
- AUTHORITY["EPSG","9122"]],
- AUTHORITY["EPSG","4326"]],
- PROJECTION["Transverse_Mercator"],
- PARAMETER["latitude_of_origin",0],
- PARAMETER["central_meridian",99],
- PARAMETER["scale_factor",0.9996],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",0],
- UNIT["metre",1,
- AUTHORITY["EPSG","9001"]],
- AXIS["Easting",EAST],
- AXIS["Northing",NORTH],
- AUTHORITY["EPSG","32647"]]
- Origin = (487068.774750000040513,2057413.889810000080615)
- Pixel Size = (0.028850000000000,-0.028850000000000)
- Metadata:
- AREA_OR_POINT=Area
- TIFFTAG_SOFTWARE=pix4dmapper
- Image Structure Metadata:
- COMPRESSION=LZW
- INTERLEAVE=PIXEL
- Corner Coordinates:
- Upper Left ( 487068.775, 2057413.890) ( 98d52'38.72"E, 18d36'27.34"N)
- Lower Left ( 487068.775, 2055503.702) ( 98d52'38.77"E, 18d35'25.19"N)
- Upper Right ( 488892.181, 2057413.890) ( 98d53'40.94"E, 18d36'27.38"N)
- Lower Right ( 488892.181, 2055503.702) ( 98d53'40.98"E, 18d35'25.22"N)
- Center ( 487980.478, 2056458.796) ( 98d53' 9.85"E, 18d35'56.28"N)
- Band 1 Block=63203x1 Type=Byte, ColorInterp=Red
- NoData Value=-10000
- Mask Flags: PER_DATASET ALPHA
- Band 2 Block=63203x1 Type=Byte, ColorInterp=Green
- NoData Value=-10000
- Mask Flags: PER_DATASET ALPHA
- Band 3 Block=63203x1 Type=Byte, ColorInterp=Blue
- NoData Value=-10000
- Mask Flags: PER_DATASET ALPHA
- Band 4 Block=63203x1 Type=Byte, ColorInterp=Alpha
- NoData Value=-10000
-
-As you can see, this GeoTiff has not been tiled. For accessing subsets though, tiling can make a difference. With tiling, data are stored and compressed in blocks (tiled) rather than line by line (stripped).
-
-In the command output above it is visible that each band has blocks with the same width of the image (63203) and a unit length. The grids in the picture below show an image with equally sized tiles (left) and the same number of strips (right). To read data from the red subset, the intersected area will have to be decompressed.
-
- .. figure:: img/tiled_vs_stripped.png
- :align: center
-
-In the tiled image we will have to decompress only 16 tiles, whereas in the stripped image on the right we’ll have to decompress many more strips.
-
-Drone images data usually have a stripped structure so, in most cases, they need to be optimized to increase performances.
-
-Let’s take a look at the gdal_translate command used to optimize our GeoTiff:
-
-.. code-block:: shell
-
- gdal_translate -co TILED=YES -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR
- --config GDAL_TIFF_INTERNAL_MASK YES -b 1 -b 2 -b 3 -mask 4
- chiangMai_ortho.tif
- chiangMai_ortho_optimized.tif
-
-.. note:: For the details about the command parameters see https://geoserver.geo-solutions.it/edu/en/raster_data/advanced_gdal/example5.html
-
-Once the process ended, call the gdalinfo command on the resulting tif file:
-
-.. code-block:: shell
-
- gdalinfo chiangMai_ortho_optimized.tif
-
-The following should be the results:
-
-.. code-block:: shell
-
- Driver: GTiff/GeoTIFF
- Files: chiangMai_ortho_optimized.tif
- Size is 63203, 66211
- Coordinate System is:
- PROJCS["WGS 84 / UTM zone 47N",
- GEOGCS["WGS 84",
- DATUM["WGS_1984",
- SPHEROID["WGS 84",6378137,298.257223563,
- AUTHORITY["EPSG","7030"]],
- AUTHORITY["EPSG","6326"]],
- PRIMEM["Greenwich",0,
- AUTHORITY["EPSG","8901"]],
- UNIT["degree",0.0174532925199433,
- AUTHORITY["EPSG","9122"]],
- AUTHORITY["EPSG","4326"]],
- PROJECTION["Transverse_Mercator"],
- PARAMETER["latitude_of_origin",0],
- PARAMETER["central_meridian",99],
- PARAMETER["scale_factor",0.9996],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",0],
- UNIT["metre",1,
- AUTHORITY["EPSG","9001"]],
- AXIS["Easting",EAST],
- AXIS["Northing",NORTH],
- AUTHORITY["EPSG","32647"]]
- Origin = (487068.774750000040513,2057413.889810000080615)
- Pixel Size = (0.028850000000000,-0.028850000000000)
- Metadata:
- AREA_OR_POINT=Area
- TIFFTAG_SOFTWARE=pix4dmapper
- Image Structure Metadata:
- COMPRESSION=YCbCr JPEG
- INTERLEAVE=PIXEL
- SOURCE_COLOR_SPACE=YCbCr
- Corner Coordinates:
- Upper Left ( 487068.775, 2057413.890) ( 98d52'38.72"E, 18d36'27.34"N)
- Lower Left ( 487068.775, 2055503.702) ( 98d52'38.77"E, 18d35'25.19"N)
- Upper Right ( 488892.181, 2057413.890) ( 98d53'40.94"E, 18d36'27.38"N)
- Lower Right ( 488892.181, 2055503.702) ( 98d53'40.98"E, 18d35'25.22"N)
- Center ( 487980.478, 2056458.796) ( 98d53' 9.85"E, 18d35'56.28"N)
- Band 1 Block=256x256 Type=Byte, ColorInterp=Red
- NoData Value=-10000
- Mask Flags: PER_DATASET
- Band 2 Block=256x256 Type=Byte, ColorInterp=Green
- NoData Value=-10000
- Mask Flags: PER_DATASET
- Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
- NoData Value=-10000
- Mask Flags: PER_DATASET
-
-Our GeoTiff is now tiled with 256x256 tiles, has 3 bands and a 1-bit mask for nodata.
-
-We can also add internal overviews to the file using the gdaladdo command:
-
-.. code-block:: shell
-
- gdaladdo -r average chiangMai_ortho_optimized.tif 2 4 8 16 32 64 128 256 512
-
-Overviews are duplicate versions of your original data, but resampled to a lower resolution, they can also be compressed with various algorithms, much in the same way as the original dataset.
-
-By default, overviews take the same compression type and transparency masks of the input dataset (applied through the gdal_translate command), so the parameters to be specified are:
-
- * :guilabel:`-r average`: computes the average of all non-NODATA contributing pixels
- * :guilabel:`2 4 8 16 32 64 128 256 512`: the list of integral overview levels to build (from gdal version 2.3 levels are no longer required to build overviews)
-
-Calling the gdalinfo command again:
-
-.. code-block:: shell
-
- gdalinfo chiangMai_ortho_optimized.tif
-
-It results in:
-
-.. code-block:: shell
-
- Driver: GTiff/GeoTIFF
- Files: chiangMai_ortho_optimized.tif
- Size is 63203, 66211
- Coordinate System is:
- PROJCS["WGS 84 / UTM zone 47N",
- GEOGCS["WGS 84",
- DATUM["WGS_1984",
- SPHEROID["WGS 84",6378137,298.257223563,
- AUTHORITY["EPSG","7030"]],
- AUTHORITY["EPSG","6326"]],
- PRIMEM["Greenwich",0,
- AUTHORITY["EPSG","8901"]],
- UNIT["degree",0.0174532925199433,
- AUTHORITY["EPSG","9122"]],
- AUTHORITY["EPSG","4326"]],
- PROJECTION["Transverse_Mercator"],
- PARAMETER["latitude_of_origin",0],
- PARAMETER["central_meridian",99],
- PARAMETER["scale_factor",0.9996],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",0],
- UNIT["metre",1,
- AUTHORITY["EPSG","9001"]],
- AXIS["Easting",EAST],
- AXIS["Northing",NORTH],
- AUTHORITY["EPSG","32647"]]
- Origin = (487068.774750000040513,2057413.889810000080615)
- Pixel Size = (0.028850000000000,-0.028850000000000)
- Metadata:
- AREA_OR_POINT=Area
- TIFFTAG_SOFTWARE=pix4dmapper
- Image Structure Metadata:
- COMPRESSION=YCbCr JPEG
- INTERLEAVE=PIXEL
- SOURCE_COLOR_SPACE=YCbCr
- Corner Coordinates:
- Upper Left ( 487068.775, 2057413.890) ( 98d52'38.72"E, 18d36'27.34"N)
- Lower Left ( 487068.775, 2055503.702) ( 98d52'38.77"E, 18d35'25.19"N)
- Upper Right ( 488892.181, 2057413.890) ( 98d53'40.94"E, 18d36'27.38"N)
- Lower Right ( 488892.181, 2055503.702) ( 98d53'40.98"E, 18d35'25.22"N)
- Center ( 487980.478, 2056458.796) ( 98d53' 9.85"E, 18d35'56.28"N)
- Band 1 Block=256x256 Type=Byte, ColorInterp=Red
- NoData Value=-10000
- Overviews: 31602x33106, 15801x16553, 7901x8277, 3951x4139, 1976x2070, 988x1035, 494x518, 247x259, 124x130
- Mask Flags: PER_DATASET
- Overviews of mask band: 31602x33106, 15801x16553, 7901x8277, 3951x4139, 1976x2070, 988x1035, 494x518, 247x259, 124x130
- Band 2 Block=256x256 Type=Byte, ColorInterp=Green
- NoData Value=-10000
- Overviews: 31602x33106, 15801x16553, 7901x8277, 3951x4139, 1976x2070, 988x1035, 494x518, 247x259, 124x130
- Mask Flags: PER_DATASET
- Overviews of mask band: 31602x3Results in:3106, 15801x16553, 7901x8277, 3951x4139, 1976x2070, 988x1035, 494x518, 247x259, 124x130
- Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
- NoData Value=-10000
- Overviews: 31602x33106, 15801x16553, 7901x8277, 3951x4139, 1976x2070, 988x1035, 494x518, 247x259, 124x130
- Mask Flags: PER_DATASET
- Overviews of mask band: 31602x33106, 15801x16553, 7901x8277, 3951x4139, 1976x2070, 988x1035, 494x518, 247x259, 124x130
-
-Notice that the transparency masks of internal overviews have been applied (their compression does not show up in the file metadata).
-
-UAVs usually provide also two other types of data: ``DTM (Digital Terrain Model)`` and ``DSM (Digital Surface Model)``.
-
-Those data require different processes to be optimized. Let’s look at some examples to better understand how to use gdal to accomplish that task.
-
-From the `CHIANG MAI Urban Flooding GeoNode platform `_ platform it is currently available the ``chiangMai_dtm_optimized`` Dataset,
-let’s download its original dataset.
-
-This dataset should contain the DTM file ``chiangMai_dtm.tif``.
-
-Calling the gdalinfo command on it:
-
-.. code-block:: shell
-
- gdalinfo chiangMai_dtm.tif
-
-The following information will be displayed:
-
-.. code-block:: shell
-
- Driver: GTiff/GeoTIFF
- Files: chiangMai_dtm.tif
- Size is 12638, 13240
- Coordinate System is:
- PROJCS["WGS 84 / UTM zone 47N",
- GEOGCS["WGS 84",
- DATUM["WGS_1984",
- SPHEROID["WGS 84",6378137,298.257223563,
- AUTHORITY["EPSG","7030"]],
- AUTHORITY["EPSG","6326"]],
- PRIMEM["Greenwich",0,
- AUTHORITY["EPSG","8901"]],
- UNIT["degree",0.0174532925199433,
- AUTHORITY["EPSG","9122"]],
- AUTHORITY["EPSG","4326"]],
- PROJECTION["Transverse_Mercator"],
- PARAMETER["latitude_of_origin",0],
- PARAMETER["central_meridian",99],
- PARAMETER["scale_factor",0.9996],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",0],
- UNIT["metre",1,
- AUTHORITY["EPSG","9001"]],
- AXIS["Easting",EAST],
- AXIS["Northing",NORTH],
- AUTHORITY["EPSG","32647"]]
- Origin = (487068.774750000040513,2057413.889810000080615)
- Pixel Size = (0.144270000000000,-0.144270000000000)
- Metadata:
- AREA_OR_POINT=Area
- TIFFTAG_SOFTWARE=pix4dmapper
- Image Structure Metadata:
- COMPRESSION=LZW
- INTERLEAVE=BAND
- Corner Coordinates:
- Upper Left ( 487068.775, 2057413.890) ( 98d52'38.72"E, 18d36'27.34"N)
- Lower Left ( 487068.775, 2055503.755) ( 98d52'38.77"E, 18d35'25.19"N)
- Upper Right ( 488892.059, 2057413.890) ( 98d53'40.94"E, 18d36'27.37"N)
- Lower Right ( 488892.059, 2055503.755) ( 98d53'40.98"E, 18d35'25.22"N)
- Center ( 487980.417, 2056458.822) ( 98d53' 9.85"E, 18d35'56.28"N)
- Band 1 Block=12638x1 Type=Float32, ColorInterp=Gray
- NoData Value=-10000
-
-Reading this image could be very slow because it has not been tiled yet. So, as discussed above, its data need to be stored and compressed in tiles to increase performances.
-
-The following gdal_translate command should be appropriate for that purpose:
-
-.. code-block:: shell
-
- gdal_translate -co TILED=YES -co COMPRESS=DEFLATE chiangMai_dtm.tif chiangMai_dtm_optimized.tif
-
-When the data to compress consists of imagery (es. aerial photographs, true-color satellite images, or colored maps) you can use lossy algorithms such as JPEG. We are now compressing data where the precision is important, the band data type is Float32 and elevation values should not be altered, so a lossy algorithm such as JPEG is not suitable. JPEG should generally only be used with Byte data (8 bit per channel) so we have choosen the lossless DEFLATE compression through the COMPRESS=DEFLATE creation option.
-
-Calling the gdalinfo command again:
-
-.. code-block:: shell
-
- gdalinfo chiangMai_dtm_optimized.tif
-
-We can observe the following results:
-
-.. code-block:: shell
-
- Driver: GTiff/GeoTIFF
- Files: chiangMai_dtm_optimized.tif
- Size is 12638, 13240
- Coordinate System is:
- PROJCS["WGS 84 / UTM zone 47N",
- GEOGCS["WGS 84",
- DATUM["WGS_1984",
- SPHEROID["WGS 84",6378137,298.257223563,
- AUTHORITY["EPSG","7030"]],
- AUTHORITY["EPSG","6326"]],
- PRIMEM["Greenwich",0,
- AUTHORITY["EPSG","8901"]],
- UNIT["degree",0.0174532925199433,
- AUTHORITY["EPSG","9122"]],
- AUTHORITY["EPSG","4326"]],
- PROJECTION["Transverse_Mercator"],
- PARAMETER["latitude_of_origin",0],
- PARAMETER["central_meridian",99],
- PARAMETER["scale_factor",0.9996],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",0],
- UNIT["metre",1,
- AUTHORITY["EPSG","9001"]],
- AXIS["Easting",EAST],
- AXIS["Northing",NORTH],
- AUTHORITY["EPSG","32647"]]
- Origin = (487068.774750000040513,2057413.889810000080615)
- Pixel Size = (0.144270000000000,-0.144270000000000)
- Metadata:
- AREA_OR_POINT=Area
- TIFFTAG_SOFTWARE=pix4dmapper
- Image Structure Metadata:
- COMPRESSION=DEFLATE
- INTERLEAVE=BAND
- Corner Coordinates:
- Upper Left ( 487068.775, 2057413.890) ( 98d52'38.72"E, 18d36'27.34"N)
- Lower Left ( 487068.775, 2055503.755) ( 98d52'38.77"E, 18d35'25.19"N)
- Upper Right ( 488892.059, 2057413.890) ( 98d53'40.94"E, 18d36'27.37"N)
- Lower Right ( 488892.059, 2055503.755) ( 98d53'40.98"E, 18d35'25.22"N)
- Center ( 487980.417, 2056458.822) ( 98d53' 9.85"E, 18d35'56.28"N)
- Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
- NoData Value=-10000
-
-We need also to create overviews through the gdaladdo command:
-
-.. code-block:: shell
-
- gdaladdo -r nearest chiangMai_dtm_optimized.tif 2 4 8 16 32 64
-
-Unlike the previous example, overviews will be created with the **nearest resampling algorithm**. That is due to the nature of the data we are representing: we should not consider the average between two elevation values but simply the closer one, it is more reliable regarding the conservation of the original data.
-
-Calling the gdalinfo command again:
-
-.. code-block:: shell
-
- gdalinfo chiangMai_dtm_optimized.tif
-
-We can see the following information:
-
-.. code-block:: shell
-
- Driver: GTiff/GeoTIFF
- Files: chiangMai_dtm_optimized.tif
- Size is 12638, 13240
- Coordinate System is:
- PROJCS["WGS 84 / UTM zone 47N",
- GEOGCS["WGS 84",
- DATUM["WGS_1984",
- SPHEROID["WGS 84",6378137,298.257223563,
- AUTHORITY["EPSG","7030"]],
- AUTHORITY["EPSG","6326"]],
- PRIMEM["Greenwich",0,
- AUTHORITY["EPSG","8901"]],
- UNIT["degree",0.0174532925199433,
- AUTHORITY["EPSG","9122"]],
- AUTHORITY["EPSG","4326"]],
- PROJECTION["Transverse_Mercator"],
- PARAMETER["latitude_of_origin",0],
- PARAMETER["central_meridian",99],
- PARAMETER["scale_factor",0.9996],
- PARAMETER["false_easting",500000],
- PARAMETER["false_northing",0],
- UNIT["metre",1,
- AUTHORITY["EPSG","9001"]],
- AXIS["Easting",EAST],
- AXIS["Northing",NORTH],
- AUTHORITY["EPSG","32647"]]
- Origin = (487068.774750000040513,2057413.889810000080615)
- Pixel Size = (0.144270000000000,-0.144270000000000)
- Metadata:
- AREA_OR_POINT=Area
- TIFFTAG_SOFTWARE=pix4dmapper
- Image Structure Metadata:
- COMPRESSION=DEFLATE
- INTERLEAVE=BAND
- Corner Coordinates:
- Upper Left ( 487068.775, 2057413.890) ( 98d52'38.72"E, 18d36'27.34"N)
- Lower Left ( 487068.775, 2055503.755) ( 98d52'38.77"E, 18d35'25.19"N)
- Upper Right ( 488892.059, 2057413.890) ( 98d53'40.94"E, 18d36'27.37"N)
- Lower Right ( 488892.059, 2055503.755) ( 98d53'40.98"E, 18d35'25.22"N)
- Center ( 487980.417, 2056458.822) ( 98d53' 9.85"E, 18d35'56.28"N)
- Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
- NoData Value=-10000
- Overviews: 6319x6620, 3160x3310, 1580x1655, 790x828, 395x414, 198x207
-
-Overviews have been created. By default, they inherit the same compression type of the original dataset (there is no evidence of it in the gdalinfo output).
-
-Other Raster Data Use Cases
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-* `Serving a large number of GrayScale GeoTiff with Palette `_
-* `Serving a large number of DTM ASCII Grid Files `_
-* `Serving a large number of Cartographic Black/White GeoTiff with Palette `_
-* `Serving a large number of satellite/aerial RGB GeoTiff with compression `_
-* `Optimizing and serving UAV data `_
-* `Optimizing and serving 16-bits satellite/aerial RGB GeoTiff `_
-
-Process Raster Datasets Programmatically
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-In this section we will provide a set of :guilabel:`shell` scripts which might be very useful to batch process a lot of raster datasets programmatically.
-
-1. ``process_gray.sh``
-
- .. code-block:: shell
-
- for filename in *.tif*; do echo gdal_translate -co TILED=YES -co COMPRESS=DEFLATE $filename ${filename//.tif/.optimized.tif}; done > gdal_translate.sh
- chmod +x gdal_translate.sh
- ./gdal_translate.sh
-
- .. code-block:: shell
-
- for filename in *.optimized.tif*; do echo gdaladdo -r nearest $filename 2 4 8 16 32 64 128 256 512; done > gdaladdo.sh
- for filename in *.optimized.tif*; do echo mv \"$filename\" \"${filename//.optimized.tif/.tif}\"; done > rename.sh
- chmod +x *.sh
- ./gdaladdo.sh
- ./rename.sh
-
-2. ``process_rgb.sh``
-
- .. code-block:: shell
-
- for filename in *.tif*; do echo gdal_translate -co TILED=YES -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -b 1 -b 2 -b 3 $filename ${filename//.tif/.optimized.tif}; done > gdal_translate.sh
- chmod +x gdal_translate.sh
- ./gdal_translate.sh
-
- .. code-block:: shell
-
- for filename in *.optimized.tif*; do echo gdaladdo -r average $filename 2 4 8 16 32 64 128 256 512; done > gdaladdo.sh
- for filename in *.optimized.tif*; do echo mv \"$filename\" \"${filename//.optimized.tif/.tif}\"; done > rename.sh
- chmod +x *.sh
- ./gdaladdo.sh
- ./rename.sh
-
-3. ``process_rgb_alpha.sh``
-
- .. code-block:: shell
-
- for filename in *.tif*; do echo gdal_translate -co TILED=YES -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR --config GDAL_TIFF_INTERNAL_MASK YES -b 1 -b 2 -b 3 -mask 4 $filename ${filename//.tif/.optimized.tif}; done > gdal_translate.sh
- chmod +x gdal_translate.sh
- ./gdal_translate.sh
-
- .. code-block:: shell
-
- for filename in *.optimized.tif*; do echo gdaladdo -r average $filename 2 4 8 16 32 64 128 256 512; done > gdaladdo.sh
- for filename in *.optimized.tif*; do echo mv \"$filename\" \"${filename//.optimized.tif/.tif}\"; done > rename.sh
- chmod +x *.sh
- ./gdaladdo.sh
- ./rename.sh
-
-4. ``process_rgb_palette.sh``
-
- .. code-block:: shell
-
- for filename in *.tif*; do echo gdal_translate -co TILED=YES -co COMPRESS=DEFLATE $filename ${filename//.tif/.optimized.tif}; done > gdal_translate.sh
- chmod +x gdal_translate.sh
- ./gdal_translate.sh
-
- .. code-block:: shell
-
- for filename in *.optimized.tif*; do echo gdaladdo -r average $filename 2 4 8 16 32 64 128 256 512; done > gdaladdo.sh
- for filename in *.optimized.tif*; do echo mv \"$filename\" \"${filename//.optimized.tif/.tif}\"; done > rename.sh
- chmod +x *.sh
- ./gdaladdo.sh
- ./rename.sh
-
-.. _createsuperuser:
-
-Thesaurus Import and Export
-===========================
-
-See :ref:`load_thesaurus` and :ref:`dump_thesaurus`.
-
-
-Create Users and Super Users
-============================
-
-Your first step will be to create a user. There are three options to do so, depending on which kind of user you want to create you may
-choose a different option. We will start with creating a *superuser*, because this user is the most important. A superuser
-has all the permissions without explicitly assigning them.
-
-The easiest way to create a superuser (in linux) is to open your terminal and type:
-
- .. code-block:: shell
-
- $ DJANGO_SETTINGS_MODULE=geonode.settings python manage.py createsuperuser
-
- .. 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 createsuperuser
-
-You will be asked a username (in this tutorial we will call the superuser you now create *your_superuser*), an email address and a password.
-
-Now you've created a superuser you should become familiar with the *Django Admin Interface*. As a superuser you are having
-access to this interface, where you can manage users, Datasets, permission and more. To learn more detailed about this interface
-check this LINK. For now it will be enough to just follow the steps. To attend the *Django Admin Interface*, go to your geonode website and *sign in* with *your_superuser*. Once you've logged in, the name of your user will appear on the top right. Click on it and the following menu
-will show up:
-
- .. figure:: img/menu_admin.png
- :align: center
-
-
-Clicking on *Admin* causes the interface to show up.
-
- .. figure:: img/admin_interface.png
- :align: center
-
-Go to *Auth* -> *Users* and you will see all the users that exist at the moment. In your case it will only be *your_superuser*. Click on it, and you will see a section on *Personal Info*, one on *Permissions* and one on *Important dates*. For the moment, the section on *Permissions* is the most important.
-
- .. figure:: img/permissions_django_admin.png
- :align: center
-
-As you can see, there are three boxes that can be checked and unchecked. Because you've created a superuser, all three boxes
-are checked as default. If only the box *active* would have been checked, the user would not be a superuser and would not be able to
-access the *Django Admin Interface* (which is only available for users with the *staff* status). Therefore keep the following
-two things in mind:
-
-* a superuser is able to access the *Django Admin Interface* and he has all permissions on the data uploaded to GeoNode.
-* an ordinary user (created from the GeoNode interface) only has *active* permissions by default. The user will not have the ability to access the *Django Admin Interface* and certain permissions have to be added for him.
-
-Until now we've only created superusers. So how do you create an ordinary user? You have two options:
-
-#. Django Admin Interface
-
- First we will create a user via the *Django Admin Interface* because we've still got it open. Therefore go back to *Auth* -> *Users* and you should find a button on the right that says *Add user*.
-
- .. figure:: img/add_user.png
- :align: center
-
- Click on it and a form to fill out will appear. Name the new user test_user, choose a password and click *save* at the right bottom of the site.
-
- .. figure:: img/add_test_user.png
- :align: center
-
- Now you should be directed to the site where you could
- change the permissions on the user *test_user*. As default only *active* is checked. If you want this user also to be able to attend this admin interface
- you could also check *staff status*. But for now we leave the settings as they are!
-
- .. todo:: groups and permissions!
-
- To test whether the new user was successfully created, go back to the GeoNode web page and try to sign in.
-
-#. GeoNode website
-
- To create an ordinary user you could also just use the GeoNode website. If you installed GeoNode using a release, you should
- see a *Register* button on the top, beside the *Sign in* button (you might have to log out before).
-
- .. figure:: img/register.png
- :align: center
-
- Hit the button and again a form will appear for you to fill out. This user will be named *geonode_user*
-
- .. figure:: img/sign_up_test_user.png
- :align: center
-
- .. todo:: NEW IMAGE WITH GEONODE USER!
-
- By hitting *Sign up* the user will be signed up, as default only with the status *active*.
-
-.. _batch_sync_permissions:
-
-Batch Sync Permissions
-======================
-
-GeoNode provides a very useful management command ``set_layers_permisions`` allowing an administrator to easily add / remove permissions to groups and users on one or more Datasets.
-
-The ``set_layers_permisions`` command arguments are:
-
-- **permissions** to set/unset --> read, download, edit, manage
-
- .. code-block:: python
-
- READ_PERMISSIONS = [
- 'view_resourcebase'
- ]
- DOWNLOAD_PERMISSIONS = [
- 'view_resourcebase',
- 'download_resourcebase'
- ]
- EDIT_PERMISSIONS = [
- 'view_resourcebase',
- 'change_dataset_style',
- 'download_resourcebase',
- 'change_resourcebase_metadata',
- 'change_dataset_data',
- 'change_resourcebase'
- ]
- MANAGE_PERMISSIONS = [
- 'delete_resourcebase',
- 'change_resourcebase',
- 'view_resourcebase',
- 'change_resourcebase_permissions',
- 'change_dataset_style',
- 'change_resourcebase_metadata',
- 'publish_resourcebase',
- 'change_dataset_data',
- 'download_resourcebase'
- ]
-
-NB: the above permissions list may change with the ADVANCED_WORKFLOW enabled. For additional info: https://docs.geonode.org/en/master/admin/admin_panel/index.html#how-to-enable-the-advanced-workflow
-
-- **resources** (Datasets) which permissions will be assigned on --> type the Dataset id, multiple choices can be typed with comma separator, if no ids are provided all the Datasets will be considered
-- **users** who permissions will be assigned to, multiple choices can be typed with a comma separator
-- **groups** who permissions will be assigned to, multiple choices can be typed with a comma separator
-- **delete** flag (optional) which means the permissions will be unset
-
-Usage examples:
----------------
-
-1. Assign **edit** permissions on the Datasets with id **1** and **2** to the users **username1** and **username2** and to the group **group_name1**.
-
- .. code-block:: shell
-
- python manage.py set_layers-permissions -p edit -u username1,username2 -g group_name1 -r 1,2
-
-2. Assign **manage** permissions on all the Datasets to the group **group_name1**.
-
- .. code-block:: shell
-
- python manage.py set_layers-permissions -p manage -g group_C
-
-3. Unset **download** permissions on the Dataset with id **1** for the user **username1**.
-
- .. code-block:: shell
-
- python manage.py set_layers-permissions -p download -u username1 -r 1 -d
-
-The same functionalities, with some limitations, are available also from the :guilabel:`Admin Dashboard >> Users` or :guilabel:`Admin Dashboard >> Groups >> Group profiles`.
-
-.. figure:: img/layer_batch_perms_admin.png
- :align: center
-
-An action named :guilabel:`Set layer permissions` is available from the list, redirecting the administrator to a form to set / unset read, edit, download permissions on the selected Users/group profile.
-
-.. figure:: img/layer_batch_perms_form.png
- :align: center
-
-Is enough to select the dataset and press "Submit". If the async mode is activated, the permission assign is asyncronous
-
-.. _delete_resources:
-
-Delete Certain GeoNode Resources
-================================
-
-The ``delete_resources`` :guilabel:`Management Command` allows to remove resources meeting a certain condition,
-specified in a form of a serialized django Q() expression.
-
-First of all let's take a look at the ``--help`` option of the ``delete_resources``
-management command in order to inspect all the command options and features.
-
-Run
-
-.. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py delete_resources --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 delete_resources --help
-
-This will produce output the following output:
-
-.. code-block:: shell
-
- usage: manage.py delete_resources [-h] [-c CONFIG_PATH]
- [-l LAYER_FILTERS [LAYER_FILTERS ...]]
- [-m MAP_FILTERS [MAP_FILTERS ...]]
- [-d DOCUMENT_FILTERS [DOCUMENT_FILTERS ...]]
- [--version] [-v {0,1,2,3}]
- [--settings SETTINGS]
- [--pythonpath PYTHONPATH] [--traceback]
- [--no-color] [--force-color]
-
- Delete resources meeting a certain condition
-
- optional arguments:
- -h, --help show this help message and exit
- -c CONFIG_PATH, --config CONFIG_PATH
- Configuration file path. Default is:
- delete_resources.json
- -l LAYER_FILTERS [LAYER_FILTERS ...], --layer_filters LAYER_FILTERS [LAYER_FILTERS ...]
- -m MAP_FILTERS [MAP_FILTERS ...], --map_filters MAP_FILTERS [MAP_FILTERS ...]
- -d DOCUMENT_FILTERS [DOCUMENT_FILTERS ...], --document_filters DOCUMENT_FILTERS [DOCUMENT_FILTERS ...]
- --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.
-
-
-There are two ways to declare Q() expressions filtering which resources should be deleted:
-
-1. With a JSON configuration file: passing ``-c`` argument specifying the path to the JSON configuration file.
-
-* **Example 1**: Relative path to the config file (to ``manage.py``)
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py delete_resources -c geonode/base/management/commands/delete_resources.json
-
-
-* **Example 2**: Absolute path to the config file
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py delete_resources -c /home/User/Geonode/configs/delete_resources.json
-
-
-2. With CLI: passing ``-l`` ``-d`` ``-m`` list arguments for each of resources (Datasets, documents, maps)
-
-* **Example 3**: Delete resources without configuration file
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py delete_resources -l 'Q(pk__in: [1, 2]) | Q(title__icontains:"italy")' 'Q(owner__name=admin)' -d '*' -m "Q(pk__in=[1, 2])"
-
-
-
-Configuration File
-------------------
-
-The JSON configuration file should contain a single `filters` object, which consists of `Dataset`, `map` and `document` lists.
-Each list specifies the filter conditions applied to a corresponding queryset, defining which items will be deleted.
-The filters are evaluated and directly inserted into Django .filter() method, which means the filters occurring as
-separated list items are treated as AND condition. To create OR query ``|`` operator should be used. For more info please check Django
-[documentation](https://docs.djangoproject.com/en/3.2/topics/db/queries/#complex-lookups-with-q-objects)).
-The only exception is passing a list with ``'*'`` which will cause deleting all the queryset of the resource.
-
-* **Example 4**: Example content of the configuration file, which will delete Datasets with ID's 1, 2, and 3, those owned by `admin` user, along with all defined maps.
-
- .. code-block:: shell
-
- {
- "filters": {
- "Dataset": [
- "Q(pk__in=[1, 2, 3]) | Q(title__icontains='italy')",
- "Q(user__name=admin)"
- ],
- "map": ["*"],
- "document": []
- }
- }
-
-
-CLI
----
-
-The CLI configuration can be specified with ``-l`` ``-d`` ``-m`` list arguments, which in fact are a translation
-of the configuration JSON file. ``-l`` ``-d`` ``-m`` arguments are evaluated in the same manner as filters.Dataset,
-filters.map and filter.document accordingly from the Example 4.
-The following example's result will be equivalent to Example 4:
-
-* **Example 5**: Example CLI configuration, which will delete Datasets with ID's 1, 2, and 3, along with all maps.
-
- .. code-block:: shell
-
- DJANGO_SETTINGS_MODULE=geonode.settings python manage.py delete_resources -l 'Q(pk__in: [1, 2, 3]) | Q(title__icontains:"italy")' 'Q(owner__name=admin)' -m '*'
-
-
-Async execution over http
-=========================
-
-It is possible to expose and run management commands over http.
-
-To run `custom django management commands `_ usually we make make use of the command line:
-
-.. code-block:: shell
-
- python manage.py ping_mngmt_commands_http
- $> pong
-
-The ``management_commands_http`` app allows us to run commands when we have no access to the command line.
-It's possible to run a command using the API or the django admin GUI.
-
-For security reasons, only admin users can access the feature and the desired command needs to be explicitly exposed.
-By default the following commands are exposed: *ping_mngmt_commands_http*, *updatelayers*, *sync_geonode_datasets*, *sync_geonode_maps*, *importlayers* and *set_all_datasets_metadata*.
-
-To expose more command you can change the environment variable ``MANAGEMENT_COMMANDS_EXPOSED_OVER_HTTP`` and the added commands will be exposed in your application.
-
-The list of exposed commands is available by the endpoint ``list_management_commands`` and also presented by the form in the admin page ``create management command job``.
-
-.. note:: To use the commands in an asyncronous approach ``ASYNC_SIGNALS`` needs to be set to ``True`` and celery should be running.
-
-Manage using django admin interface
------------------------------------
-
-Creating a job
-^^^^^^^^^^^^^^
-
-Access the admin panel: ``http:///admin`` and go to "Management command jobs".
-
-.. figure:: img/management_commands_over_http_admin.png
- :align: center
- :alt: Management commands over http admin menu.
-
- *Management command admin section*
-
-You will arrive at http:///en/admin/management_commands_http/managementcommandjob/,
-then click on the buttton ``+ Add management command job`` (``http:///en/admin/management_commands_http/managementcommandjob/add/``).
-
-.. figure:: img/management_commands_over_http_btn_add_job.png
- :align: center
- :alt: Button: Add management command job.
-
- *Add management command job*
-
-Select the command and fill the form, with the arguments and/or key-arguments if needed.
-Save you job and in the list select the ``start`` action, alterantively you can mark the ``autostart`` option and the command will be automatic started when created.
-
-.. figure:: img/management_commands_over_http_add_job.png
- :align: center
- :alt: Form: Add management command job.
-
- *Creating a management command job form*
-
-
-Starting a job
-^^^^^^^^^^^^^^
-
-To start a job:
-
-.. figure:: img/management_commands_over_http_start_job.png
- :align: center
- :alt: Starting a management command job.
-
- *Starting a job*
-
-1. Select the job to be started.
-2. Select the ``start`` action.
-3. Click in ``Go``.
-4. The page will refresh and the job status will have changed. If it takes a long to run, refresh the page to see the updated the status.
-5. A ``stop`` option is also available.
-
-.. note::
- If it takes too long to load the page, ``ASYNC_SIGNALS`` may not be activated.
- If its status gets stuck at ``QUEUED``, verify if celery is running and properly configured.
-
-
-Job status
-^^^^^^^^^^
-
-Clicking at the link in the ID of a job, we can see the details of this job.
-For the job we just created, we can verify the output message and celery job status.
-
-.. figure:: img/management_commands_over_http_job_status.png
- :align: center
- :alt: Management command job status.
-
- *Example job status*
-
-
-When we have an error during execution the traceback message will be available in the ``Celery traceback``.
-In the next image a ``ping_mngmt_commands_http`` job was created with the arguments ``["--force_exception", true]``.
-Checking the text in this field can be useful when troubleshooting errors.
-
-.. figure:: img/management_commands_over_http_job_status_with_traceback.png
- :align: center
- :alt: Management command job status with a traceback message.
-
- *Example job traceback message*
-
-
-Manage using API endpoints
---------------------------
-
-The execution of the management commands can be handled by http requests to an API: ``http:///api/v2/management/``.
-
-All the requests need to be authenticated with administrative permissions (*superuser*).
-
-You can find here a postman collection with all the exemples listed here and other available endpoints:
-
-:download:`geonode_mngmt_commands.postman_collection.json `
-
-
-List exposed commands
-^^^^^^^^^^^^^^^^^^^^^
-
-Getting a list of the exposed commands:
-
-.. code-block:: shell
-
- curl --location --request GET 'http:///api/v2/management/commands/' --header 'Authorization: Basic YWRtaW46YWRtaW4='
-
-Response:
-
-.. code-block:: json
-
- {
- "success": true,
- "error": null,
- "data": [
- "ping_mngmt_commands_http",
- "updatelayers",
- "set_all_datasets_metadata",
- "sync_geonode_maps",
- "importlayers",
- "sync_geonode_datasets"
- ]
- }
-
-.. note:: You should change the header ``Authorization`` (``Basic YWRtaW46YWRtaW4=``) to your Auth token, in this example I am using a token for ``admin`` as username and ``admin`` as password.
-
-Creating a job
-^^^^^^^^^^^^^^
-
-Optionally, before creating the job you can get its *help message* with the following call:
-
-.. code-block:: shell
-
- curl --location --request GET 'http:///api/v2/management/commands/ping_mngmt_commands_http/' --header 'Authorization: Basic YWRtaW46YWRtaW4='
-
-
-Creating a job for running ``ping_mngmt_commands_http`` with 30 seconds of sleep time:
-
-.. code-block:: shell
-
- curl --location --request POST 'http:///api/v2/management/commands/ping_mngmt_commands_http/jobs/' \
- --header 'Authorization: Basic YWRtaW46YWRtaW4=' \
- --header 'Content-Type: application/json' \
- --data-raw '{
- "args": ["--sleep", 30],
- "kwargs": {},
- "autostart": false
- }'
-
-Response:
-
-.. code-block:: json
-
- {
- "success": true,
- "error": null,
- "data": {
- "id": 8,
- "command": "ping_mngmt_commands_http",
- "app_name": "geonode.management_commands_http",
- "user": 1000,
- "status": "CREATED",
- "created_at": "2021-10-08T18:17:25.045752Z",
- "start_time": null,
- "end_time": null,
- "args": [
- "--sleep",
- 30
- ],
- "kwargs": {},
- "celery_result_id": null,
- "output_message": null
- }
- }
-
-
-.. note:: Alterantively you can omit the ``jobs`` part of the url to create a job. (Using ``http:///api/v2/management/commands/ping_mngmt_commands_http/`` as url)
-
-
-Start/Stop actions
-^^^^^^^^^^^^^^^^^^
-
-To start the created job:
-
-.. code-block:: shell
-
- curl --location --request PATCH 'http:///api/v2/management/jobs/8/start/' --header 'Authorization: Basic YWRtaW46YWRtaW4='
-
-Response:
-
-.. code-block:: json
-
- {
- "success": true,
- "error": null,
- "data": {
- "id": 8,
- "command": "ping_mngmt_commands_http",
- "app_name": "geonode.management_commands_http",
- "user": 1000,
- "status": "QUEUED",
- "created_at": "2021-10-08T18:17:25.045752Z",
- "start_time": null,
- "end_time": null,
- "args": [
- "--sleep",
- 30
- ],
- "kwargs": {},
- "celery_result_id": null,
- "output_message": null
- }
- }
-
-.. note:: During execution the job can be interrupted using the following call:
-
- .. code-block:: shell
-
- curl --location --request PATCH 'http:///api/v2/management/jobs/8/stop/' --header 'Authorization: Basic YWRtaW46YWRtaW4='
-
-Note that the status changed from **CREATED** to **QUEUED**, during execution it will be **STARTED** and at the end **FINISHED**.
-
-Jobs list and status
-^^^^^^^^^^^^^^^^^^^^
-
-You can verify your job status and details with the following call:
-
-.. code-block:: shell
-
- curl --location --request GET 'http:///api/v2/management/jobs/8/status/' --header 'Authorization: Basic YWRtaW46YWRtaW4='
-
-Response:
-
-.. code-block:: json
-
- {
- "id": 8,
- "command": "ping_mngmt_commands_http",
- "app_name": "geonode.management_commands_http",
- "user": 1000,
- "status": "FINISHED",
- "created_at": "2021-10-08T18:17:25.045752Z",
- "start_time": "2021-10-08T18:20:02.761475Z",
- "end_time": "2021-10-08T18:20:32.802007Z",
- "args": [
- "--sleep",
- 30
- ],
- "kwargs": {},
- "celery_result_id": "fe7359a6-5f8c-47bf-859a-84351b5ed80c",
- "output_message": "Sleeping for 30.0 seconds...\npong\n",
- "celery_task_meta": {
- "date_done": "2021-10-08T18:20:32.810649Z",
- "status": "SUCCESS",
- "traceback": null,
- "worker": "worker1@4f641ffa9c0b"
- }
- }
-
-When runing multiple jobs and to audit already ran jobs. A list of jobs can be retrieved using the following call:
-
-.. code-block:: shell
-
- curl --location --request GET 'http:///api/v2/management/jobs/' --header 'Authorization: Basic YWRtaW46YWRtaW4='
-
-Response:
-
-.. code-block:: json
-
- {
- "links": {
- "next": null,
- "previous": null
- },
- "total": 1,
- "page": 1,
- "page_size": 10,
- "data": [
- {
- "id": 1,
- "command": "ping_mngmt_commands_http",
- "app_name": "geonode.management_commands_http",
- "user": 1000,
- "status": "FINISHED",
- "created_at": "2021-10-08T18:17:25.045752Z"
- }
- ]
- }
-
-
-.. note:: This list can be filtered by the fields "celery_result_id", "command", "app_name", "status", "user" and "user__username".
-
-
diff --git a/admin/thesaurus/index.rst b/admin/thesaurus/index.rst
deleted file mode 100644
index 8efa8f6a..00000000
--- a/admin/thesaurus/index.rst
+++ /dev/null
@@ -1,330 +0,0 @@
-.. _thesauri:
-
-Thesauri
-========
-
-Introduction
-------------
-
-A **thesaurus** is a structured vocabulary used to manage and standardize keywords (also known as tags) that describe resources. It helps improve metadata quality, searchability, and interoperability by enforcing controlled vocabularies.
-
-Key Functions
--------------
-
-Controlled Vocabulary
- Instead of free-text keywords, thesauri offer predefined and **standardized terms** organized thematically (e.g., ISO 19115 topics, GEMET, INSPIRE themes).
-
-Semantic Consistency
- Users tagging datasets can choose from a consistent list of terms, **reducing redundancy** and ambiguity (e.g., avoiding both "roads" and "road" as separate tags).
-
-Improved search and filtering
- Thesauri enable structured tagging of datasets, allowing more accurate searches and the use of **faceted filters** to easily narrow down results.
-
-Localization
- Each concept in a thesaurus can have **translations for different languages**, allowing localized display based on the user’s interface language.
-
-Metadata Standards Integration
- Thesauri can align with **international standards** (like ISO, INSPIRE, GEMET), which is especially important when GeoNode is used in institutional or governmental contexts.
-
-
-Data model
-----------
-
-The *GeoNode thesaurus model* is designed to support multilingual, structured vocabularies. It consists of the following key components:
-
-Thesaurus:
- * Represents a full controlled vocabulary (e.g., GEMET, INSPIRE themes).
- * In SKOS terms, it's a ``skos:ConceptScheme``.
-
-ThesaurusLabel:
- * Stores the localized names (titles/descriptions) of a thesaurus for different languages.
- * In SKOS terms, it's a ``skos:preflabel`` within the ``skos:ConceptScheme``.
-
-ThesaurusKeyword:
- * Represents a single concept or term within a thesaurus (e.g., "Land Cover", "Transport"), also storing the default label (used where the translation for a given requested language is not defined) and its identifying URI.
- * In SKOS terms, it's a ``skos:Concept``.
-
-ThesaurusKeywordLabel:
- * Stores the multilingual labels for each keyword.
- * In SKOS terms, it's a ``skos:preflabel`` within the ``skos:Concept``.
-
-.. _thesaurus_add:
-
-Adding a Thesaurus
-==================
-
-A thesaurus can be added in Geonode by:
-
-* creating a new thesaurus instance within the GeoNode admin pages.
- As a minumum, you need to:
-
- * add a thesaurus in admin / base / Thesaurus
- * add one or more instances of Keywords in admin / base / ThesaurusKeywords
-* uploading a RDF file (either xml, ttl, jsonld or any other format recognized by `RDFlib `__).
- When uploading a file, the behaviour is the same as running the command ``thesaurus load --action update`` (see :ref:`load_thesaurus`)
-* loading a RDF file using the `thesaurus load` management command (see :ref:`load_thesaurus`).
-
-
-Upload an RDF file via the thesaurus admin page
------------------------------------------------
-
-Navigate to the thesaurus page in the admin panel ``http:///admin/base/thesaurus``.
-On the top-right of the page a button named :guilabel:`Upload thesaurus` will be available:
-
-.. figure:: img/thesaurus_admin_1.png
- :align: center
-
-After clicking on it, a simple form for the upload will be shown which will allow you to select your desired RDF file:
-
-.. figure:: img/thesaurus_admin_2.png
- :align: center
-
-By clicking on `Upload RDF`, the system will load the thesaurus and assign it a "slugified" name based on the file name.
-The name can be easily changed later in the edit page.
-
-If everything goes fine, a success message will be shown:
-
-.. figure:: img/thesaurus_admin_success.png
- :align: center
-
-Otherwise the UI will show the error message:
-
-.. figure:: img/thesaurus_admin_fail.png
- :align: center
-
-
-
-Management commands
-===================
-
-GeoNode provides a single command (``thesaurus``) with multiple actions:
-
-* ``list``: list existing thesauri
-* ``load``: load a RDF file
-* ``dump``: dump a thesaurus into a file
-
-.. code-block::
-
- python manage.py thesaurus --help
-
- usage: manage.py thesaurus [-h] [-i [IDENTIFIER]] [-f [FILE]] [--action {create,update,append,parse}] [-o [OUT]]
- [--include INCLUDE] [--exclude EXCLUDE]
- [--format {json-ld,n3,nt,pretty-xml,sorted-xml,trig,ttl,xml}] [--default-lang LANG] [--version]
- [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color]
- [--force-color] [--skip-checks]
- [{list,load,dump}]
-
- Handles thesaurus commands ['list', 'load', 'dump']
-
- positional arguments:
- {list,load,dump} thesaurus operation to run
-
- options:
- -h, --help show this help message and exit
- --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.
-
- Common params:
- -i [IDENTIFIER], --identifier [IDENTIFIER]
- Thesaurus identifier. Dump: required. Load: optional - if omitted will be created out of the filename
-
- Params for "load" subcommand:
- -f [FILE], --file [FILE]
- Full path to a thesaurus in RDF format
- --action {create,update,append,parse}
- Actions to run upon data loading (default: create)
-
- Params for "dump" subcommand:
- -o [OUT], --out [OUT]
- Full path to the output file to be created
- --include INCLUDE Inclusion filter (wildcard is * as suffix or prefix); can be repeated
- --exclude EXCLUDE Exclusion filter (wildcard is * as suffix or prefix); can be repeated
- --format {json-ld,n3,nt,pretty-xml,sorted-xml,trig,ttl,xml}
- Format string supported by rdflib, or sorted-xml (default: sorted-xml)
- --default-lang LANG Default language code for untagged string literals (default: None)
-
-
-List thesauri: ``thesaurus list``
----------------------------------
-
-Get a list of the thesauri in GeoNode.
-
-Useful to find out the id of the thesauri when you need to export one of them.
-
-
-.. _load_thesaurus:
-
-Importing a thesaurus: ``thesaurus load``
------------------------------------------
-
-The ``load`` command may create an entire Thesaurus, or just update part of it.
-
-Allowed params:
-
-* ``file``: file to load; required
-* ``action``: ``create``, ``update``, ``append``, ``parse``; optional, default ``create``;
-* ``identifier``: the id of the thesaurus; optional, defaults to a name created using the filename.
-
-The **automatic identifier creation** skips all the chars after the first dot in order to allow a thesaurus partitioning.
-
-For instance we may have different rdf files containing the labels for multiple projects, e.g.: ``labels-i18n.proj1.rdf``, ``labels-i18n.proj2.rdf``... We may simply loop on the filenames and run the ``load`` subcommand on each of them, and all the keywords will be added to the same Thesaurus having id ``labels-i18n``.
-
-The ``load`` command has different behaviours according to the ``action`` parameter:
-
-Actions:
-
-* ``parse``:
- parse the file and loop on all the concepts without writng anything in the db. Is equivalent to the classic ``dryrun`` option;
-* ``create`` (default action):
- tries and create a thesaurus. If the thesaurus already exists, raises an exception.
-* ``append``:
- creates entries if they do not exist; pk are the ones listed in update action.
- If the entry already exists, it is not changed in any way.
-* ``update``:
- creates and updates entries:
-
- * *Thesaurus*: creates it if it doesn't exist, pk is "identifier".
- If it exists updates "date", "description", "title", "about"
- * *ThesaurusLabel*: creates it if it doesn't exist, pk is "thesaurus", "lang"
- If it exists updates "value"
- * *ThesaurusKeyword*: creates it if it doesn't exist, pk is "thesaurus", "about"
- If it exists updates "alt_label"
- * *ThesaurusKeywordlabel*: creates it if it doesn't exist, pk is "thesauruskeyword", "lang"
- If it exists updates "label"
-
-
-.. _dump_thesaurus:
-
-Exporting a thesaurus: ``thesaurus dump``
------------------------------------------
-
-The ``dump`` command may export an entire Thesaurus or just a part of it.
-
-
-Allowed params:
-
-- ``identifier``: the id of the thesaurus; required.
-- ``include``: Optional; filter ThesaurusKeywords to be dumped. Can be repeated. Filtering is applied on the `about` field. Filters are in the format either `*string` or `string*`
-- ``exclude``: Optional; like `include` but filter out ThesaurusKeywords from being dumped.
-- ``format``: optional, RDF format for the output (``json-ld``, ``n3``, ``nt``, ``pretty-xml``, ``sorted-xml``, ``trig``, ``ttl``, ``xml``). Default ``sorted-xml``
-- ``default-lang``: Default language code for untagged string literals; default is from ``settings.THESAURUS_DEFAULT_LANG``
-- ``out``: Full path to the output file to be created. Optional; if omitted the RDF content is sent to stderr.
-
-
-Format
-^^^^^^
-
-All the formats, except for ``sorted-xml``, use the *RDFlib* library to serialize the thesaurus data. Since RDFlib handles the concepts as a graph, there is no ordering in the output data. This means that two consecutive ``dump`` of the same thesaurus may create two different files.
-
-When importing and exporting thesauri as a file, it may be useful to perform diff on them to find out what has changed.
-The format ``sorted-xml`` creates a predictable output, where the ConceptScheme is at the start of the file, and the Concepts are sorted by their ``about`` field. Furthermore, the ``prefLabel``'s are sorted by their ``lang`` attribute.
-
-
-Partial export
-^^^^^^^^^^^^^^
-
-The ``dump`` command also allows to export a subset of the keywords (concepts) in a Thesaurus.
-
-As an example, let's say we have the ``labels-i18n`` thesaurus, which contains some GeoNode official labels.
-
-In our project we added some keywords prefixed with "proj1_", since they belong to project1.
-
-Also in our GeoNode instance, we added some labels which override the standard ones, and are postfixed with ``_ovr``.
-
-In order to only export the entries we edited, we'll issue the command::
-
- python manage.py thesaurus dump -i labels-i18n --include "proj1_*" --include "*_ovr" -f labels-i18n.proj1.rdf
-
-
-Configuring a Thesaurus
-=======================
-
-After a thesaurus is loaded o created in GeoNode, it should be configured in the :guilabel:`Admin` panel.
-
-The panel can be reached from :guilabel:`Admin` link of the *User Menu* in the navigation bar or through this URL: ``http:///admin/base/thesaurus``.
-
-Once you are on the Thesaurus lists, select one thesaurus to open the Edit page
-
-.. figure:: img/thesaurus_edit_page.png
- :align: center
-
- *The GeoNode Thesaurus edit Interface*
-
-These are the thesaurus main attributes:
-
-- ``identifier``: (mandatory) the thesaurus identifier (set by the ``--identifier`` parameter in the ``thesaurus load`` command, or automatically generated using the file name).
-- ``title``: (mandatory) The default title of the thesaurus (may be set from the loaded RDF file).
-- ``date``: (mandatory) The Date of the thesaurus (may be set from the loaded RDF file).
-- ``description``: (mandatory) The description of the thesaurus (may be set from the loaded RDF file).
-- ``slug``: (deprecated, use ``identifier`` instead) The slug of the thesaurus.
-- ``about``: (optional) The ``rdf:about`` URI of the thesaurus (may be set from the loaded RDF file).
-
-Next attributes define **how the thesaurus shall be used** within GeoNode.
-
-- ``card min``: (optional) The minimum cardinality, default = 0
-- ``card max``: (optional) The maximum cardinality, default = -1 (no limit)
-- ``facet``: (boolean) Decide if the thesaurus will be shown in the facet list, default: True -- To be set to `true` only when ``card_max != 0``
-- ``order``: (integer) Set the listing order of the thesaurus in the facet list and in the metadata editor, default: 0, asc order from 0 to N
-
-If ``card max`` is not zero, the metadata editor will automatically display the Thesaurus in the list of the controlled terms.
-More precisely these are the cases according to the two cardinality fields:
-
-- `card_max=0` --> Disabled, The Thesaurus will not appear in the GUI
-- `card_max=1` & `card_min = 0` --> Single choice, optional.
-- `card_max=1` & `card_min = 1` --> Single choice, required
-- `card_max=-1` & `card_min = 0` --> [0..N] Multiple choices, optional
-- `card_max=-1` & `card_min = 1` --> [1..N] Multiple choices, required
-
-The metadata editor will show all the thesauri with ``card_max != 0``, each one with its own title, like in the following image:
-
-
-.. figure:: img/thesaurus_choices.png
- :align: center
-
- *The metadata interface with the Thesaurus enabled*
-
-
-The Thesauri having ``card_max == 0`` are used as **codelists**: it means that they will be referred within GeoNode via their identifier for specific purposes. There will be ad-hoc documentation for each of such codelists.
-
-For instance, the thesaurus with identifier ``labels-i18n`` is used for the metadata labels translations.
-
-
-Using keywords from a thesaurus
-===============================
-
-After you've finished the setup you should find a new input widget in the metadata editor allowing you to choose keywords from the thesaurus for your resource.
-
-Also, if you set the ``facet`` attribute to ``true``, the thesaurus should be listed in the filter section in GeoNode's resource list views.
-
-For instance, if we have these thesauri:
-
-.. figure:: img/thesaurus_admin_list.png
- :align: center
- :width: 450px
-
- *List of configured sample thesauri*
-
-
-both set with ``card max != 0`` and ``facet = true``, we'll have in the editor:
-
-.. figure:: img/thesaurus_edit_sample.png
- :align: center
- :width: 450px
-
- *Keyword selectors for sample thesauri*
-
-and we'll also have them in the filtering panel as facets:
-
-.. figure:: img/thesaurus_facet_sample.png
- :align: center
-
- *Facets selectors for sample thesauri*
diff --git a/admin/upgrade/3.2-to-3.3/index.rst b/admin/upgrade/3.2-to-3.3/index.rst
deleted file mode 100644
index c72b5617..00000000
--- a/admin/upgrade/3.2-to-3.3/index.rst
+++ /dev/null
@@ -1,113 +0,0 @@
-.. _geonode-upgrade-3.2.x-3.3.x:
-
-Upgrade from 3.2.x / 3.3.x
-==========================
-
-1. Upgrade the dependencies
-2. Perform the ``migrations`` management command; in case some attribute is conflicting, remove it manually from the DB
-3. Proform the ``collectstatic`` management command
-
-Upgrade the instance dependencies
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Check the :ref:`install_dep` and :ref:`install_venv` sections in order to upgrade your Python environment.
-
-Also, make sure the code is ``Python 3.8`` compatible and that you switched and aligned the **source code** and the **requirements.txt** to the ``master`` branch.
-
-This must be done manually and with particular attention.
-
-.. code-block:: shell
-
- workon
- cd
- pip install -r requirements.txt
-
- cd /
-
- pip install pip --upgrade
- pip install -r requirements.txt --upgrade
- pip install -e . --upgrade
- pip install pygdal=="`gdal-config --version`.*"
-
- ./manage.sh collectstatic --noinput
-
-
-Run GeoNode migrations
-^^^^^^^^^^^^^^^^^^^^^^
-
-Activate your GeoNode virtualenv and set the env vars:
-
-.. code-block:: sql
-
- . env/bin/Activate
- export vars_210
-
-Here are the variables to export - update them to your environment settings:
-
-.. code-block:: shell
-
- export DATABASE_URL=postgis://user:***@localhost:5432/dbname
- export DEFAULT_BACKEND_DATASTORE=data
- export GEODATABASE_URL=postgis://user:***@localhost:5432/geonode_data
- export ALLOWED_HOSTS="['localhost', '192.168.100.10']"
- export STATIC_ROOT=~/www/geonode/static/
- export GEOSERVER_LOCATION=http://localhost:8080/geoserver/
- export GEOSERVER_PUBLIC_LOCATION=http://localhost:8080/geoserver/
- export GEOSERVER_ADMIN_PASSWORD=geoserver
- export SESSION_EXPIRED_CONTROL_ENABLED=False
-
-
-Apply migrations and apply basic fixtures:
-
-.. code-block:: shell
-
- ./manage.py migrate --fake-initial
- paver sync
-
-
-.. note:: Incase of an error of :guilabel:`django.db.utils.ProgrammingError: column "colum-name" of relation "table-name" already exists` on running migrations, you can backup the field data with the following steps.
-
-.. code-block:: shell
-
- ./manage.sh dbshell
-
-.. code-block:: sql
-
- ALTER TABLE
DROP COLUMN _bkp;
-
- \q
-
-
-Create superuser
-^^^^^^^^^^^^^^^^
-
-To create a superuser you should drop the following constraints (they can be re-enabled if needed):
-
-.. code-block:: sql
-
- alter table people_profile alter column last_login drop not null;
-
-.. code-block:: shell
-
- ./manage createsuperuser
-
-
-Update Templates
-^^^^^^^^^^^^^^^^
-
-Update available templates to use {% load static %} instead of {% load staticfiles %}
diff --git a/admin/upgrade/index.rst b/admin/upgrade/index.rst
deleted file mode 100644
index fb45b0c9..00000000
--- a/admin/upgrade/index.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-===============
-Upgrade GeoNode
-===============
-
-.. toctree::
- :maxdepth: 3
-
- 3.2-to-3.3/index
-
-.. toctree::
- :maxdepth: 3
-
- 3.x-to-4.x/index
diff --git a/admin/upload-parallelism-limit/index.rst b/admin/upload-parallelism-limit/index.rst
deleted file mode 100644
index d4ebc1a3..00000000
--- a/admin/upload-parallelism-limit/index.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-
-.. _upload-parallelism-limits:
-
-Upload Parallelism Limit
-========================
-
-Default: ``5``
-
-When `uploading datasets <../../usage/managing_datasets/uploading_datasets.html#datasets-uploading>`__, this value limits the number os parallel uploads.
-
-You will get the following message in case of error: ``The number of active parallel uploads exceeds 5. Wait for the pending ones to finish.``
-
-This means that you to finish current active uploads before creating a new one.
-The default maximum number is set during installation by `DEFAULT_MAX_PARALLEL_UPLOADS_PER_USER <../../basic/settings/index.html#default-max-parallel-uploads-per-user>`__, usually 5 parallel uploads.
-
-After installation, only an user with administrative rights can change it by the admin painel or `accessing by api <../../devel/api/V2/index.html#get--api-v2-upload-parallelism-limits->`__.
-
-
-Accessing the limits in the admin panel
-=======================================
-Access the admin panel, scroll until you find the "Upload Parallelism limits" option.
-
- .. figure:: img/admin_panel_upload_parallelism_limit.png
- :align: center
-
-Click at it, and you will be redirected to the limits list.
-
- .. figure:: img/admin_panel_parallel_limit.png
- :align: center
-
-To change it, click at the slug of the limit, then you can change its description and the max_number value. Changing the slug will not produce any effect.
diff --git a/admin/upload-size-limits/index.rst b/admin/upload-size-limits/index.rst
deleted file mode 100644
index 3a8d64e3..00000000
--- a/admin/upload-size-limits/index.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-
-.. _upload-size-limits:
-
-Upload Size Limits
-==================
-
-Default: ``104857600`` (100 MB in total bytes)
-
-When `uploading datasets <../../usage/managing_datasets/uploading_datasets.html#datasets-uploading>`__
-or `uploading documents <../../usage/managing_documents/uploading_documents.html#uploading-documents>`__,
-the total size of the uploaded files is verified.
-
-If it passes a limit value, you will get something similar to the following error:
- .. figure:: img/size-limit-error.png
- :align: center
-
-
-With the following message: ``Total upload size exceeds 100.0 MB. Please try again with smaller files.``
-
-This means that the file you tried to upload is too large. It consider the sum of sizes in the case of datasets/layers with multiple files (ESRI Shapefile).
-The default maximum value is set during installation by `DEFAULT_MAX_UPLOAD_SIZE <../../basic/settings/index.html#default-max-upload-size>`__, usually 100 MB.
-
-After installation, only an user with administrative rights can change it by the admin painel or `accessing by api <../../devel/api/V2/index.html#get--api-v2-upload-size-limits->`__.
-
-
-Accessing the limits in the admin panel
-=======================================
-Access the admin panel, scroll until you find the "Upload Size limits" option.
-
- .. figure:: img/admin_panel_upload_size_limits.png
- :align: center
-
-Click at it, and you will be redirected to the limits list.
-
- .. figure:: img/admin_panel_size_limits_list.png
- :align: center
-
-We have two limits here, one for datasets/layers and other for documents.
-
-Changing a Limit
-================
-
-To change it, click at the slug of one of the limits.
-
- .. figure:: img/changing_limit_to_200mb.jpg
- :align: center
-
-You can change its description and the max_size value. Changing the slug will not produce any effect.
-
-Max size value should be entered in bytes, this means that 200 MB is around 200000000 bytes, or 200 * 1024 * 1024 = 209715200 if you want to use exact values.
-After editing, remember to save and verify in the list if the value is the expected one.
-
-If you try to upload a dataset/layer larger than 100 MB again (but smaller than the new limit) it won't raise any errors.
-
-Advanced notes for developers
-=============================
-
-When uploading a file there is an additional validation step, to avoid the creation of big temporary files.
-This happens with the use of a custom `File Upload Handler `__.
-
-During this step we verify the total size of the request, if it's considerably bigger than the defined limit, an empty file with a fake large number set as its size is created when processing the request.
-Later, during the form validation, the related error will be raised.
-
-The threshould for this to happen is set to ``2 * MAX_UPLOAD_SIZE + 2 MB`` where MAX_UPLOAD_SIZE is the Upload Size Limit defined by the admin user.
-When changing the processes related to the upload size limiting, the upload handlers should also be taken into account. Otherwise, this can lead to the creating of empty datasets and documents.
diff --git a/advanced/components/index.rst b/advanced/components/index.rst
deleted file mode 100644
index bb9c04c5..00000000
--- a/advanced/components/index.rst
+++ /dev/null
@@ -1,1076 +0,0 @@
-.. _geoserver_geonode_aa:
-
-OAuth2 Security: Authentication and Authorization
-=================================================
-GeoNode interacts with GeoServer through an advanced security mechanism based on OAuth2 Protocol and GeoFence. This section is a walk through of the configuration and setup of GeoNode and GeoServer Advanced Security.
-
-What we will see in this section is:
-
-* **Introduction**
-
-* **GeoNode** (Security Backend):
-
- #. Django Authentication
-
- #. Django OAuth Toolkit Setup and Configuration
-
- #. Details on ``settings.py`` Security Settings
-
-* **GeoServer** (Security Backend):
-
- #. GeoServer Security Subsystem
-
- #. Introduction to the GeoServer OAuth2 Security Plugin
-
- #. Configuration of the ``GeoNode REST Role Service``
-
- #. Configuration of the ``GeoNode OAuth2 Authentication Filter``
-
- #. The GeoServer Authentication Filter Chains
-
- #. Introduction to GeoFence Plugin, the Advanced Security Framework for GeoServer
-
-* **Troubleshooting and Advanced Features**:
-
- #. Common Issues and Fixes
-
- #. How to setup ``HTTPS`` secured endpoints
-
- #. GeoFence Advanced Features
-
-Introduction
-------------
-
-GeoServer, i.e. the geospatial backend server of GeoNode, is a spatial server which needs authenticated users in order to access protected resources or administration functions.
-
-GeoServer supports several kind of Authentication and Authorization mechanisms. Those systems are pluggable and GeoServer can use them at the same time by the use of a ``Filter Chain``.
-Briefly this mechanism allows GeoServer to check for different A&A protocols one by one. The first one matching is used by GeoServer to authorize the users.
-
-GeoNode Authentication is based by default on Django Security Subsystem. Django authentication allows GeoNode to manage its internal users, groups, roles and sessions.
-
-GeoNode has some external components, like GeoServer or QGis Server, which are pluggable and stand-alone services, devoted to the management of geospatial data.
-Those external services have their own authentication and authorization mechanisms which must be synchronized somehow with the GeoNode one. Also, those external services
-maintain, in most of the cases and unless specific configuration does not disable this, alternative security access which for instance allow GeoNode to modify the geospatial catalog
-under the hood, or a system administrator to have independent and privileged access to the servers.
-
-Before going deeply on how GeoServer/GeoNode A&A works and how it can be configured in order to work correctly with GeoNode, let's quickly clarify the difference between the ``Authentication`` and ``Authorization`` concepts.
-
-Authentication
-^^^^^^^^^^^^^^
-
-Authentication is the process of verifying the identity of someone through the use of some sort of credentials and a handshake protocol.
-If the credentials are valid, the authorization process starts. Authentication process always proceeds to Authorization process (although they may often seem to be combined).
-The two terms are often used synonymously but they are two different processes.
-
-For more details and explanation about the authentication concepts, take a look `here `_.
-
-Authorization
-^^^^^^^^^^^^^
-
-Authorization is the process of allowing authenticated users to access protected resources by checking its roles and rights against some sort of security rules mechanism or protocol.
-In other words it allows to control access rights by granting or denying specific permissions to specific authorized users.
-
-GeoNode Security Backend
-------------------------
-
-DJango Authentication
-^^^^^^^^^^^^^^^^^^^^^
-
-The Django authentication system handles both authentication and authorization.
-
-The auth system consists of:
-
-#. Users
-#. Permissions: Binary (yes/no) flags designating whether a user may perform a certain task.
-#. Groups: A generic way of applying labels and permissions to more than one user.
-#. A configurable password hashing system
-#. Forms and view tools for logging in users, or restricting content
-#. A pluggable backend system
-
-The authentication system in Django aims to be very generic and doesn’t provide some features commonly found in web authentication systems. Solutions for some of these common problems have been implemented in third-party packages:
-
-#. Password strength checking
-#. Throttling of login attempts
-#. Authentication against third-parties (OAuth, for example)
-
-.. note:: For more details on installation and configuration of Django authentication system, please refer to the official guide https://docs.djangoproject.com/en/3.2/topics/auth/.
-
-GeoNode communicates with GeoServer through Basic Authentication under the hood, in order to configure the data and the GeoServer catalog.
-
-In order to do this, you must be sure that GeoNode knows the **internal** admin user and password of GeoServer.
-
-.. warning:: This must be an internal GeoServer user with admin rights, not a GeoNode one.
-
-Make sure the credentials are correctly configured into the file ``settings.py``
-
-OGC_SERVER
-^^^^^^^^^^
-
-Ensure that the ``OGC_SERVER`` settings are correctly configured.
-
-Notice that the two properties ``LOGIN_ENDPOINT`` and ``LOGOUT_ENDPOINT`` must specify the GeoServer OAuth2 Endpoints (see details below).
-The default values ``'j_spring_oauth2_geonode_login'`` and ``'j_spring_oauth2_geonode_logout'`` work in most of the cases, unless you need some specific endpoints different from the later.
-In any case those values **must** be coherent with the GeoServer OAuth2 Plugin configuration.
-
-If in doubt, please use the default values here below.
-
-Default values are:
-
-.. code-block:: python
-
- ...
- # OGC (WMS/WFS/WCS) Server Settings
- # OGC (WMS/WFS/WCS) Server Settings
- OGC_SERVER = {
- 'default': {
- 'BACKEND': 'geonode.geoserver',
- 'LOCATION': GEOSERVER_LOCATION,
- 'LOGIN_ENDPOINT': 'j_spring_oauth2_geonode_login',
- 'LOGOUT_ENDPOINT': 'j_spring_oauth2_geonode_logout',
- # PUBLIC_LOCATION needs to be kept like this because in dev mode
- # the proxy won't work and the integration tests will fail
- # the entire block has to be overridden in the local_settings
- 'PUBLIC_LOCATION': GEOSERVER_PUBLIC_LOCATION,
- 'USER': 'admin',
- 'PASSWORD': 'geoserver',
- 'MAPFISH_PRINT_ENABLED': True,
- 'PRINT_NG_ENABLED': True,
- 'GEONODE_SECURITY_ENABLED': True,
- 'WMST_ENABLED': False,
- 'BACKEND_WRITE_ENABLED': True,
- 'WPS_ENABLED': False,
- 'LOG_FILE': '%s/geoserver/data/logs/geoserver.log' % os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)),
- # Set to name of database in DATABASES dictionary to enable
- 'DATASTORE': '', # 'datastore',
- 'TIMEOUT': 10 # number of seconds to allow for HTTP requests
- }
- }
- ...
-
-GeoNode and GeoServer A&A Interaction
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The GeoServer instance used by GeoNode, has a particular setup that allows the two frameworks to correctly interact and exchange informations on users credentials and permissions.
-
-In particular GeoServer is configured with a ``Filter Chain`` for Authorization that makes use of the two following protocols:
-
- #. **Basic Authentication**; this is the default GeoServer Authentication mechanism. This makes use of `rfc2617 - Basic and Digest Access Authentication `_ in order to check for user's credentials.
- In other words, GeoServer takes a ``username`` and a ``password`` encoded `Base64 `_ on the HTTP Request Headers and compare them against its internal database (which by default is an encrypted XML file on the GeoServer Data Dir).
- If the user's credentials match, then GeoServer checks for Authorization through its ``Role Services`` (we will see those services in details on the *GeoServer (Security Backend)* section below).
-
- .. note:: GeoServer ships by default with ``admin`` and ``geoserver`` as the default administrator user name and password. Before putting the GeoServer on-line it is imperative to change at least the administrator password.
-
- #. **OAuth2 Authentication**; this module allows GeoServer to authenticate against the `OAuth2 Protocol `_. If the Basic Authentication fails, GeoServer falls back to this by using GeoNode as OAuth2 Provider by default.
-
-.. note:: Further details can be found directly on the official GeoServer documentation at section "`Authentication Chain `_"
-
-From the **GeoNode backend (server) side**, the server will make use of **Basic Authentication** with administrator credentials to configure the GeoServer catalog. GeoServer must be reachable by GeoNode of course, and GeoNode must know the internal GeoServer admin credentials.
-
-From the **GeoNode frontend (browser and GUI) side**, the *Authentication* goal is to allow GeoServer to recognize as valid a user which has been already logged into GeoNode, providing kind of an `SSO `_ mechanism between the two applications.
-
-GeoServer must know and must be able to access GeoNode via HTTP/HTTPS. In other words, an external user connected to GeoNode must be authenticated to GeoServer with same permissions. This is possible through the **OAuth2 Authentication** Protocol.
-
-**GeoNode / GeoServer Authentication Mechanism**
-
- *GeoNode as OAuth2 Provider (OP)*
-
- OpenID Connect is an identity framework built on OAuth 2.0 protocol which extends the authorization of OAuth 2.0 processes to implement its authentication mechanism. OpenID Connect adds a discovery mechanism allowing users to use an external trusted authority as an identity provider. From another point of view, this can be seen as a single sign on (SSO) system.
-
- OAuth 2.0 is an authorization framework which is capable of providing a way for clients to access a resource with restricted access on behalf of the resource owner. OpenID Connect allows clients to verify the users with an authorization server based authentication.
-
- As an OP, GeoNode will be able to act as trusted identity provider, thus allowing the system working on an isolated environment and/or allow GeoNode to authenticate private users managed by the local DJango auth subsystem.
-
- *GeoServer as OAuth2 Relying Party (RP)*
-
- Thanks to the **OAuth2 Authentication** GeoServer is able to retrieve an end user's identity directly from the OAuth2 Provider (OP).
-
- With GeoNode acting as an OP, the mechanism will avoid the use of cookies relying, instead, on the OAuth2 secure protocol.
-
- How the OAuth2 Protocol works:
-
- .. figure:: img/oauth001.png
-
- 1. The relying party sends the request to the OAuth2 provider to authenticate the end user
-
- 2. The OAuth2 provider authenticates the user
-
- 3. The OAuth2 provider sends the ID token and access token to the relying party
-
- 4. The relying party sends a request to the user info endpoint with the access token received from OAuth2 provider
-
- 5. The user info endpoint returns the claims.
-
-**GeoNode / GeoServer Authorization Mechanism**
-
- Allowing GeoServer to make use of a OAuth2 in order to act as an OAuth2 RP, is not sufficient to map a user identity to its roles though.
-
- On GeoServer side we will still need to a ``RoleService`` which would be able to talk to GeoNode and transform the tokens into a User Principal to be used within the GeoServer Security subsystem itself.
-
- In other words after a successfull Authentication, GeoServer needs to Authorize the user in order to understand which resources he is enable to access or not.
- A ``REST based RoleService`` on GeoNode side, allows GeoServer to talk to GeoNode via `REST `_ to get the current user along with the list of its Roles.
-
- Nevertheless knowing the Roles associated to a user is not sufficient. The complete GeoServer Authorization needs to catch a set of ``Access Rules``, associated to the Roles, in order to establish which resources and data are accessible by the user.
-
- The GeoServer Authorization is based on Roles only, therefore for each authenticated user we need also to know:
-
- 1. The Roles associated to a valid user session
-
- 2. The access permissions associated to a GeoServer Resource
-
- The Authentication mechanism above allows GeoServer to get information about the user and his Roles, which addresses point 1.
-
- About point 2, GeoServer makes use of the `GeoFence Embedded Server `_ plugin.
- GeoFence is a java web application that provides an advanced authentication / authorization engine for GeoServer using the interface described in `here `_.
- GeoFence has its own rules database for the management of Authorization rules, and overrides the standard GeoServer security management system by implementing a sophisticated Resource Access Manager.
- Least but not last, GeoFence implements and exposes a `REST API `_ allowing remote authorized clients to read / write / modify security rules.
-
- The advantages using such plugin are multiple:
-
- 1. The Authorizations rules have a fine granularity. The security rules are handled by GeoFence in a way similar to the iptables ones, and allow to define security constraints even on sub-regions and attributes of layers.
-
- 2. GeoFence exposes a REST interface to its internal rule database, allowing external managers to update the security constraints programmatically
-
- 3. GeoFence implements an internal caching mechanism which improves considerably the performances under load.
-
- *GeoNode interaction with GeoFence*
-
- GeoNode itself is able to push/manage Authorization rules to GeoServer through the GeoFence `REST API `_, acting as an administrator for GeoServer.
- GeoNode properly configures the GeoFence rules anytime it is needed, i.e. the permissions of a Resource / Layer are updated.
-
-GeoServer must know and must be able to access GeoNode via HTTP/HTTPS. In other words, an external user connected to GeoNode must be authenticated to GeoServer with same permissions. This is possible through the **GeoNodeCoockieProcessingFiler**.
-
-Summarizing we will have different ways to access GeoNode Layers:
-
-#. Through GeoNode via DJango Authentication and **GeoNodeCoockieProcessingFiler**; basically the users available in GeoNode are also valid for GeoServer or any other backend.
-
- .. warning:: If a GeoNode user has "administrator" rights, he will be able to administer GeoServer too.
-
-#. Through GeoServer Security Subsystem; it will be always possible to access to GeoServer using its internal security system and users, unless explictly disabled (**warning** this is dangerous, you must know what you are doing).
-
-Let's now see in details how the single pieces are configured and how they can be configured.
-
-DJango OAuth Toolkit Setup and Configuration
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-As stated above, GeoNode makes use of the OAuth2 protocol for all the frontend interactions with GeoServer. GeoNode must be configured as an OAuth2 Provider and provide a ``Client ID`` and a ``Client Sercret`` key to GeoServer.
-This is possible by enabling and configuring the `Django OAuth Toolkit Plugin `_.
-
-.. warning:: GeoNode and GeoServer won't work at all if the following steps are not executed at the first installation.
-
-Default ``settings.py`` Security Settings for OAuth2
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Double check that the OAuth2 Provider and Security Plugin is enabled and that the settings below are correctly configured.
-
-AUTH_IP_WHITELIST
-^^^^^^^^^^^^^^^^^
-
-``AUTH_IP_WHITELIST`` property limits access to users/groups REST Role Service endpoints to the only whitelisted IP addresses. Empty list means 'allow all'.
-If you need to limit 'api' REST calls to only some specific IPs fill the list like this: ``AUTH_IP_WHITELIST = ['192.168.1.158', '192.168.1.159']``
-
-Default values are:
-
-.. code-block:: python
-
- ...
- AUTH_IP_WHITELIST = []
- ...
-
-INSTALLED_APPS
-^^^^^^^^^^^^^^
-
-In order to allow GeoNode to act as an OAuth2 Provider, we need to enable the ``oauth2_provider`` DJango application provided by the "Django OAuth Toolkit".
-
-Default values are:
-
-.. code-block:: python
-
- ...
- INSTALLED_APPS = (
-
- 'modeltranslation',
-
- ...
- 'guardian',
- 'oauth2_provider',
- ...
-
- ) + GEONODE_APPS
- ...
-
-MIDDLEWARE_CLASSES
-^^^^^^^^^^^^^^^^^^
-
-Installing the `oauth2_provider`` DJango application is not sufficient to enable the full functionality. We need also GeoNode to include additional entities to its internal model.
-
-Default values are:
-
-.. code-block:: python
-
- ...
- MIDDLEWARE_CLASSES = (
- 'django.middleware.common.CommonMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
-
- # The setting below makes it possible to serve different languages per
- # user depending on things like headers in HTTP requests.
- 'django.middleware.locale.LocaleMiddleware',
- 'pagination.middleware.PaginationMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
-
- # If you use SessionAuthenticationMiddleware, be sure it appears before OAuth2TokenMiddleware.
- # SessionAuthenticationMiddleware is NOT required for using django-oauth-toolkit.
- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
- 'oauth2_provider.middleware.OAuth2TokenMiddleware',
- )
- ...
-
-AUTHENTICATION_BACKENDS
-^^^^^^^^^^^^^^^^^^^^^^^
-
-In order to allow GeoNode to act as an OAuth2 Provider, we need to enable the ``oauth2_provider.backends.OAuth2Backend`` DJango backend provided by the "Django OAuth Toolkit".
-Also notice that we need to specify the OAuth2 Provider scopes and declare which ``generator`` to use in order to create ``OAuth2 Client IDs``.
-
-Default values are:
-
-.. code-block:: python
-
- ...
- # Replacement of default authentication backend in order to support
- # permissions per object.
- AUTHENTICATION_BACKENDS = (
- 'oauth2_provider.backends.OAuth2Backend',
- 'django.contrib.auth.backends.ModelBackend',
- 'guardian.backends.ObjectPermissionBackend',
- )
-
- OAUTH2_PROVIDER = {
- 'SCOPES': {
- 'read': 'Read scope',
- 'write': 'Write scope',
- 'groups': 'Access to your groups'
- },
-
- 'CLIENT_ID_GENERATOR_CLASS': 'oauth2_provider.generators.ClientIdGenerator',
- }
- ...
-
-Django OAuth Toolkit Admin Setup
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Once the ``settings.py`` and ``local_settings.py`` have been correctly configured for your system:
-
-#. Complete the GeoNode setup steps
-
- * Prepare the model
-
- .. code-block:: python
-
- python manage.py makemigrations
- python manage.py migrate
- python manage.py syncdb
-
- * Prepare the static data
-
- .. code-block:: python
-
- python manage.py collectstatic
-
- * Make sure the database has been populated with initial default data
-
- .. warning:: *Deprecated* this command will be replaced by migrations in the future, so be careful.
-
- .. code-block:: python
-
- python manage.py loaddata initial_data.json
-
- * Make sure there exists a superuser for your environment
-
- .. warning:: *Deprecated* this command will be replaced by migrations in the future, so be careful.
-
- .. code-block:: python
-
- python manage.py createsuperuser
-
- .. note:: Read the base tutorials on GeoNode Developer documentation for details on the specific commands and how to use them.
-
-#. Start the application
-
- Start GeoNode accordingly on how the setup has been done; run debug mode through ``paver``, or proxied by an HTTP Server like Apache2 HTTPD, Nginx or others.
-
-#. Finalize the setup of the OAuth2 Provider
-
- First of all you need to configure and create a new OAuth2 Application called ``GeoServer`` through the GeoNode Admin Dashboard
-
- * Access the GeoNode Admin Dashboard
-
- .. figure:: img/oauth002.png
-
- * Go to ``Django OAuth Toolkit`` > ``Applications``
-
- .. figure:: img/oauth003.png
-
- * Update or create the Application named ``GeoServer``
-
- .. warning:: The Application name **must** be ``GeoServer``
-
- .. figure:: img/oauth004.png
-
- - ``Client id``; An alphanumeric code representing the OAuth2 Client Id. GeoServer OAuth2 Plugin **will** use **this** value.
-
- .. warning:: In a production environment it is **highly** recommended to modify the default value provided with GeoNode installation.
-
- - ``User``; Search for the ``admin`` user. Its ``ID`` will be automatically updated into the form.
-
- - ``Redirect uris``; It is possible to specify many URIs here. Those must coincide with the GeoServer instances URIs.
-
- - ``Client type``; Choose ``Confidential``
-
- - ``Authorization grant type``; Choose ``Authorization code``
-
- - ``Client secret``; An alphanumeric code representing the OAuth2 Client Secret. GeoServer OAuth2 Plugin **will** use **this** value.
-
- .. warning:: In a production environment it is **highly** recommended to modify the default value provided with GeoNode installation.
-
- - ``Name``; **Must** be ``GeoServer``
-
-GeoServer Security Backend
---------------------------
-
-GeoServer Security Subsystem
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-GeoServer has a robust security subsystem, modeled on Spring Security. Most of the security features are available through the Web administration interface.
-
-For more details on how this works and how to configure and modify it, please refer to the official GeoServer guide http://docs.geoserver.org/stable/en/user/security/webadmin/index.html
-
-By using the ``GeoServer Data Dir`` provided with GeoNode build, the following configuration are already available. You will need just to update them accordingly to your environment (like IP addresses and Host names, OAuth2 Keys, and similar things).
-However it is recommended to read carefully all the following passages in order to understand exactly how the different component are configured and easily identify any possible issue during the deployment.
-
-The main topics of this section are:
-
-#. Connection to the GeoNode REST Role Service
-
-#. Setup of the GeoServer OAuth2 Authentication Filter
-
-#. Configuration of the GeoServer Filter Chains
-
-#. Setup and test of the GeoFence Server and Default Rules
-
-Connection to the GeoNode REST Role Service
--------------------------------------------
-
-Preliminary checks
-^^^^^^^^^^^^^^^^^^
-
-* GeoServer is up and running and you have admin rights
-
-* GeoServer must reach the GeoNode instance via HTTP
-
-* The GeoServer Host IP Address must be allowed to access the GeoNode Role Service APIs (see the section ``AUTH_IP_WHITELIST`` above)
-
-Setup of the GeoNode REST Role Service
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-#. Login as ``admin`` to the GeoServer GUI
-
- .. warning:: In a production system remember to change the default admin credentials ``admin`` \ ``geoserver``
-
- .. figure:: img/oauth005.png
-
-#. Access the ``Security`` > ``Users, Groups, Roles`` section
-
- .. figure:: img/oauth006.png
-
-#. **If not yet configured** the service ``geonode REST role service``, click on ``Role Services`` > ``Add new``
-
- .. note:: This passage is **not** needed if the ``geonode REST role service`` has been already created. If so it will be displayed among the Role Services list
-
- .. figure:: img/oauth008.png
-
- .. figure:: img/oauth007.png
-
-#. **If not yet configured** the service ``geonode REST role service``, choose ``AuthKEY REST - Role service from REST endpoint``
-
- .. figure:: img/oauth009.png
-
-#. Create / update the ``geonode REST role service`` accordingly
-
- .. figure:: img/oauth010.png
-
- - ``Name``; **Must** be ``geonode REST role service``
-
- - ``Base Server URL``; Must point to the GeoNode instance base URL (e.g. ``http://``)
-
- - ``Roles REST Endpoint``; Enter ``/api/roles``
-
- - ``Admin Role REST Endpoint``; Enter ``/api/adminRole``
-
- - ``Users REST Endpoint``; Enter ``/api/users``
-
- - ``Roles JSON Path``; Enter ``$.groups``
-
- - ``Admin Role JSON Path``; Enter ``$.adminRole``
-
- - ``Users JSON Path``; Enter ``$.users[0].groups``
-
- Once everything has been setup and it is working, choose the ``Administrator role`` and ``Group administrator role`` as ``ROLE_ADMIN``
-
-Allow GeoFence to validate rules with ``ROLES``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. warning:: The following instruction are different accordingly to the GeoServer version you are currently using.
-
-GeoServer 2.9.x and 2.10.x
---------------------------
-
-#. Access the ``Security`` > ``Settings`` section
-
- .. figure:: img/oauth011.png
-
-#. Choose the ``geonode REST role service`` as ``Active role service``
-
- .. figure:: img/oauth012.png
-
-GeoServer 2.12.x and above
---------------------------
-
-With the latest updates to GeoFence Plugin, the latter no more recognizes the Role Service from the default settings but from the ``geofence-server.properties`` file.
-
-That said, it is important that the ``Security`` > ``Settings`` role service will be set to **default**, in order to allow GeoServer following the standard authorization chain.
-
-On the other side, you will need to be sure that the ``geofence-server.properties`` file under the ``$GEOSERVER_DATA_DIR/geofence`` folder, contains the two following additional properties: ::
-
- gwc.context.suffix=gwc
- org.geoserver.rest.DefaultUserGroupServiceName=geonode REST role service
-
-
-Setup of the GeoServer OAuth2 Authentication Filter
----------------------------------------------------
-
-It is necessary now check that GeoServer can connect to OAuth2 Providers (specifically to GeoNode OP), and being able to Authenticate users through it.
-
-Preliminary checks
-^^^^^^^^^^^^^^^^^^
-
-* GeoServer is up and running and you have admin rights
-
-* GeoServer must reach the GeoNode instance via HTTP
-
-* OAuth2 ``Client ID`` and ``Client Secret`` have been generated on GeoNode and known
-
-Setup of the GeoNode OAuth2 Security Filter
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-#. Access the ``Security`` > ``Authentication`` section
-
- .. figure:: img/oauth013.png
-
-#. **If not yet configured** the Authentication Filter ``geonode-oauth2 - Authentication using a GeoNode OAuth2``, click on ``Authentication Filters`` > ``Add new``
-
- .. note:: This passage is **not** needed if the ``geonode-oauth2 - Authentication using a GeoNode OAuth2`` has been already created. If so it will be displayed among the Authentication Filters list
-
- .. figure:: img/oauth015.png
-
- .. figure:: img/oauth014.png
-
-#. **If not yet configured** the Authentication Filter ``geonode-oauth2 - Authentication using a GeoNode OAuth2``, choose ``GeoNode OAuth2 - Authenticates by looking up for a valid GeoNode OAuth2 access_token key sent as URL parameter``
-
- .. figure:: img/oauth016.png
-
-#. Create / update the ``geonode-oauth2 - Authentication using a GeoNode OAuth2`` accordingly
-
- .. figure:: img/oauth017.png
-
- - ``Name``; **Must** be ``geonode-oauth2``
-
- - ``Enable Redirect Authentication EntryPoint``; It is recommended to put this to ``False``, otherwise GeoServer won't allow you to connect to its Admin GUI through the ``Form`` but only through GeoNode
-
- - ``Login Authentication EndPoint``; Unless you have specific needs, keep the default value ``/j_spring_oauth2_geonode_login``
-
- - ``Logout Authentication EndPoint``; Unless you have specific needs, keep the default value ``/j_spring_oauth2_geonode_logout``
-
- - ``Force Access Token URI HTTPS Secured Protocol``; This must be ``False`` unless you enabled a ``Secured Connection`` on GeoNode. In that case you will need to trust the GeoNode ``Certificate`` on the GeoServer JVM Keystore. Please see details below
-
- - ``Access Token URI``; Set this to ``http:///o/token/``
-
- - ``Force User Authorization URI HTTPS Secured Protocol``; This must be ``False`` unless you enabled a ``Secured Connection`` on GeoNode. In that case you will need to trust the GeoNode ``Certificate`` on the GeoServer JVM Keystore. Please see details below
-
- - ``User Authorization URI``; Set this to ``http:///o/authorize/``
-
- - ``Redirect URI``; Set this to ``http:///geoserver``. This address **must** be present on the ``Redirect uris`` of GeoNode ``OAuth2`` > ``Applications`` > ``GeoServer`` (see above)
-
- - ``Check Token Endpoint URL``; Set this to ``http:///api/o/v4/tokeninfo/``
-
- - ``Logout URI``; Set this to ``http:///account/logout/``
-
- - ``Scopes``; Unless you have specific needs, keep the default value ``read,write,groups``
-
- - ``Client ID``; The ``Client id`` alphanumeric key generated by the GeoNode ``OAuth2`` > ``Applications`` > ``GeoServer`` (see above)
-
- - ``Client Secret``; The ``Client secret`` alphanumeric key generated by the GeoNode ``OAuth2`` > ``Applications`` > ``GeoServer`` (see above)
-
- - ``Role source``; In order to authorize the user against GeoNode, choose ``Role service`` > ``geonode REST role service``
-
-Configuration of the GeoServer Filter Chains
---------------------------------------------
-
-The following steps ensure GeoServer can adopt more Authentication methods. As stated above, it is possible to Authenticate to GeoServer using different protocols.
-
-GeoServer scans the authentication filters chain associated to the specified path and tries them one by one sequentially.
-The first one matching the protocol and able to grant access to the user, breaks the cycle by creating a ``User Principal`` and injecting it into the GeoServer ``SecurityContext``.
-The Authentication process, then, ends here and the control goes to the Authorization one, which will try to retrieve the authenticated user's Roles through the available GeoServer Role Services associated to the Authentication Filter that granted the access.
-
-Preliminary checks
-^^^^^^^^^^^^^^^^^^
-
-* GeoServer is up and running and you have admin rights
-
-* GeoServer must reach the GeoNode instance via HTTP
-
-* The ``geonode-oauth2 - Authentication using a GeoNode OAuth2`` Authentication Filter and the ``geonode REST role service`` have been correctly configured
-
-Setup of the GeoServer Filter Chains
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-#. Access the ``Security`` > ``Authentication`` section
-
- .. figure:: img/oauth013.png
-
-#. Identify the section ``Filter Chains``
-
- .. figure:: img/oauth018.png
-
-#. Make sure the ``web`` Filter Chain is configured as shown below
-
- .. figure:: img/oauth019.png
-
- .. warning:: Every time you modify a Filter Chain, **don't forget to save** the ``Authentication`` settings. This **must** be done for **each** change.
-
- .. figure:: img/oauth020.png
-
-#. Make sure the ``rest`` Filter Chain is configured as shown below
-
- .. figure:: img/oauth021.png
-
- .. warning:: Every time you modify a Filter Chain, **don't forget to save** the ``Authentication`` settings. This **must** be done for **each** change.
-
- .. figure:: img/oauth020.png
-
-#. Make sure the ``gwc`` Filter Chain is configured as shown below
-
- .. figure:: img/oauth022.png
-
- .. warning:: Every time you modify a Filter Chain, **don't forget to save** the ``Authentication`` settings. This **must** be done for **each** change.
-
- .. figure:: img/oauth020.png
-
-#. Make sure the ``default`` Filter Chain is configured as shown below
-
- .. figure:: img/oauth023.png
-
- .. warning:: Every time you modify a Filter Chain, **don't forget to save** the ``Authentication`` settings. This **must** be done for **each** change.
-
- .. figure:: img/oauth020.png
-
-#. Add the ``GeoNode Login Endpoints`` to the comma-delimited list of the ``webLogin`` Filter Chain
-
- .. figure:: img/oauth024.png
-
- .. warning:: Every time you modify a Filter Chain, **don't forget to save** the ``Authentication`` settings. This **must** be done for **each** change.
-
- .. figure:: img/oauth020.png
-
-#. Add the ``GeoNode Logout Endpoints`` to the comma-delimited list of the ``webLogout`` Filter Chain
-
- .. figure:: img/oauth025.png
-
- .. warning:: Every time you modify a Filter Chain, **don't forget to save** the ``Authentication`` settings. This **must** be done for **each** change.
-
- .. figure:: img/oauth020.png
-
-
-#. Add the ``GeoNode Logout Endpoints`` to the comma-delimited list of the ``formLogoutChain`` XML node in ``/security/filter/formLogout/config.xml``
-
- You will need a text editor to modify the file.
-
- .. note:: If the ```` XML node does not exist at all, create a **new one** as specified below
-
- .. code-block:: xml
-
-
- ...
- /web/
- /j_spring_security_logout,/j_spring_security_logout/,/j_spring_oauth2_geonode_logout,/j_spring_oauth2_geonode_logout/
-
-
- .. warning:: The value ``j_spring_oauth2_geonode_logout`` **must** be the same specified as ``Logout Authentication EndPoint`` in the ``geonode-oauth2 - Authentication using a GeoNode OAuth2`` above.
-
-Setup and test of the GeoFence Server and Default Rules
--------------------------------------------------------
-
-In order to work correctly, GeoServer needs the `GeoFence Embedded Server `_ plugin to be installed and configured on the system.
-
-The GeoServer configuration provided for GeoNode, has the plugin already installed with a default configuration. In that case double check that the plugin works correctly and the default rules have been setup by following the next steps.
-
-Preliminary checks
-^^^^^^^^^^^^^^^^^^
-
-* GeoServer is up and running and you have admin rights
-
-* The `GeoFence Embedded Server `_ plugin has been installed on GeoServer
-
-Setup of the GeoServer Filter Chains
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-#. Access the ``Security`` > ``Authentication`` section
-
- .. figure:: img/oauth013.png
-
-#. Identify the section ``Authentication Providers`` and make sure the ``geofence`` Authentication Provider is present
-
- .. figure:: img/oauth032.png
-
-#. Make sure the ``Provider Chain`` is configured as shown below
-
- .. figure:: img/oauth033.png
-
- .. warning:: Every time you modify an Authentication Providers, **don't forget to save** the ``Authentication`` settings. This **must** be done for **each** change.
-
- .. figure:: img/oauth020.png
-
-Setup of the GeoFence Server and Rules
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-#. Make sure GeoFence server works and the default settings are correctly configured
-
- - Access the ``Security`` > ``GeoFence`` section
-
- .. figure:: img/oauth026.png
-
- - Make sure the ``Options`` are configured as follows and the server works well when performing a ``Test Connection``
-
- .. figure:: img/oauth027.png
-
- * ``Allow remote and inline layers in SLD``; Set it to ``True``
-
- * ``Allow SLD and SLD_BODY parameters in requests``; Set it to ``True``
-
- * ``Authenticated users can write``; Set it to ``True``
-
- * ``Use GeoServer roles to get authorizations``; Set it to ``False``
-
-#. Check the GeoFence default Rules
-
- - Access the ``Security`` > ``GeoFence Data Rules`` section
-
- .. figure:: img/oauth028.png
-
- - Make sure the ``DENY ALL`` Rule is present by default, otherwise your data will be accessible to everyone
-
- .. note:: This rule is **always** the last one
-
- .. figure:: img/oauth029.png
-
- .. warning:: If that rule does not exists **at the very bottom** (this rule is **always** the last one), add it manually.
-
- - Access the ``Security`` > ``GeoFence Admin Rules`` section
-
- .. figure:: img/oauth030.png
-
- - No Rules needed here
-
- .. figure:: img/oauth031.png
-
-Troubleshooting and Advanced Features
---------------------------------------
-
-Common Issues and Fixes
-^^^^^^^^^^^^^^^^^^^^^^^
-
-* GeoServer/GeoNode OAuth2 does not authenticate as Administrator even using GeoNode ``admin`` users
-
- **Symptoms**
-
- When trying to authenticate with an ``admin`` user using OAuth2, the process correctly redirects to GeoServer page but I'm not a GeoServer Administrator.
-
- **Cause**
-
- That means that somehow GeoServer could not successfully complete the Authorization and Authentication process.
-
- The possible causes of the problem may be the following ones:
-
- 1. The OAuth2 Authentication fails on GeoServer side
-
- This is usually due to an exception while trying to complete the Authentication process.
-
- - A typical cause is that GeoServer tries to use HTTPS connections but the GeoNode certificate is not trusted;
-
- In that case please refer to the section below. Also take a look at the logs (in particular the GeoServer one) as explained in :ref:`debug_geonode`.
- The GeoServer logs should contain a detailed Exception explaining the cause of the problem.
- If no exception is listed here (even after raised the log level to *DEBUG*), try to check for the GeoNode Role Service as explained below.
-
- - Another possible issue is that somehow the OAuth2 handshake cannot complete successfully;
-
- 1. Login into GeoServer as administrator through its WEB login form.
-
- 2. Double check that all the ``geonode-oauth2 - Authentication using a GeoNode OAuth2`` parameters are correct. If everything is ok, take a look at the logs (in particular the GeoServer one) as explained in :ref:`debug_geonode`.
- The GeoServer logs should contain a detailed Exception explaining the cause of the problem. If no exception is listed here (even after raised the log level to *DEBUG*), try to check for the GeoNode Role Service as explained below.
-
- 2. GeoServer is not able to retrieve the user Role from a Role Service
-
- Always double check both HTTP Server and GeoServer log as specified in section :ref:`debug_geonode`. This might directly guide you to the cause of the problem.
-
- - Check that the GeoServer host is granted to access GeoNode Role Service REST APIs in the ``AUTH_IP_WHITELIST`` of the ``settings.py``
-
- - Check that the ``geonode REST role service`` is the default Role service and that the GeoServer OAuth2 Plugin has been configured to use it by default
-
- - Check that the GeoNode REST Role Service APIs are functional and produce correct JSON.
-
- This is possible by using simple ``cUrl`` GET calls like
-
- .. code-block:: shell
-
- curl http://localhost/api/adminRole
- $> {"adminRole": "admin"}
-
-
- curl http://localhost/api/users
- $> {"users": [{"username": "AnonymousUser", "groups": ["anonymous"]}, {"username": "afabiani", "groups": ["anonymous", "test"]}, {"username": "admin", "groups": ["anonymous", "test", "admin"]}]}
-
- curl http://localhost/api/roles
- $> {"groups": ["anonymous", "test", "admin"]}
-
- curl http://localhost/api/users/admin
- $> {"users": [{"username": "admin", "groups": ["anonymous", "test", "admin"]}]}
-
-
-How to setup ``HTTPS`` secured endpoints
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-In a production system it is a good practice to encrypt the connection between GeoServer and GeoNode. That would be possible by enabling HTTPS Protocol on the GeoNode REST Role Service APIs and OAuth2 Endpoints.
-
-Most of the times you will rely on a self-signed HTTPS connection using a generated certificate. That makes the connection *untrusted* and you will need to tell to the GeoServer Java Virtual Machine to trust it.
-
-This can be done by following the steps below.
-
-For any issue take a look at the logs (in particular the GeoServer one) as explained in :ref:`debug_geonode`. The GeoServer logs should contain a detailed Exception explaining the cause of the problem.
-
-SSL Trusted Certificates
-------------------------
-
-When using a custom ``Keystore`` or trying to access a non-trusted or self-signed SSL-protected OAuth2 Provider from a non-SSH connection, you will need to add the certificates to the JVM ``Keystore``.
-
-In order to do this you can follow the next steps:
-
- In this example we are going to
-
- #. Retrieve SSL Certificate from GeoNode domain:
-
- "Access Token URI" = https:///o/token/ therefore we need to trust ``https://`` or (``:443``)
-
- .. note:: You will need to get and trust certificates from every different HTTPS URL used on OAuth2 Endpoints.
-
- #. Store SSL Certificates on local hard-disk
-
- #. Add SSL Certificates to the Java Keystore
-
- #. Enable the JVM to check for SSL Certificates from the Keystore
-
-1. Retrieve the SSL Certificate from GeoNode domain
-
- Use the ``openssl`` command in order to dump the certificate
-
- For ``https://``
-
- .. code-block:: shell
-
- openssl s_client -connect :443
-
- .. figure:: img/google_ssl_001.png
- :align: center
-
-2. Store SSL Certificate on local hard-disk
-
- Copy-and-paste the section ``-BEGIN CERTIFICATE-``, ``-END CERTIFICATE-`` and save it into a ``.cert`` file
-
- .. note:: ``.cert`` file are plain text files containing the ASCII characters included on the ``-BEGIN CERTIFICATE-``, ``-END CERTIFICATE-`` sections
-
- ``geonode.cert`` (or whatever name you want with ``.cert`` extension)
-
- .. figure:: img/google_ssl_003.png
- :align: center
-
-3. Add SSL Certificates to the Java Keystore
-
- You can use the Java command ``keytool`` like this
-
- ``geonode.cert`` (or whatever name you want with ``.cert`` extension)
-
- .. code-block:: shell
-
- keytool -import -noprompt -trustcacerts -alias geonode -file geonode.cert -keystore ${KEYSTOREFILE} -storepass ${KEYSTOREPASS}
-
- or, alternatively, you can use some graphic tool which helps you managing the SSL Certificates and Keystores, like `Portecle `_
-
- .. code-block:: shell
-
- java -jar c:\apps\portecle-1.9\portecle.jar
-
- .. figure:: img/google_ssl_005.png
- :align: center
-
- .. figure:: img/google_ssl_006.png
- :align: center
-
- .. figure:: img/google_ssl_007.png
- :align: center
-
- .. figure:: img/google_ssl_008.png
- :align: center
-
- .. figure:: img/google_ssl_009.png
- :align: center
-
- .. figure:: img/google_ssl_010.png
- :align: center
-
- .. figure:: img/google_ssl_011.png
- :align: center
-
- .. figure:: img/google_ssl_012.png
- :align: center
-
- .. figure:: img/google_ssl_013.png
- :align: center
-
-4. Enable the JVM to check for SSL Certificates from the Keystore
-
- In order to do this, you need to pass a ``JAVA_OPTION`` to your JVM:
-
- .. code-block:: shell
-
- -Djavax.net.ssl.trustStore=F:\tmp\keystore.key
-
-5. Restart your server
-
-.. note:: Here below you can find a bash script which simplifies the Keystore SSL Certificates importing. Use it at your convenience.
-
- .. code-block:: shell
-
- HOST=myhost.example.com
- PORT=443
- KEYSTOREFILE=dest_keystore
- KEYSTOREPASS=changeme
-
- # get the SSL certificate
- openssl s_client -connect ${HOST}:${PORT} ${HOST}.cert
-
- # create a keystore and import certificate
- keytool -import -noprompt -trustcacerts \
- -alias ${HOST} -file ${HOST}.cert \
- -keystore ${KEYSTOREFILE} -storepass ${KEYSTOREPASS}
-
- # verify we've got it.
- keytool -list -v -keystore ${KEYSTOREFILE} -storepass ${KEYSTOREPASS} -alias ${HOST}
-
-GeoFence Advanced Features
---------------------------
-
-GeoFence Rules Management and Tutorials
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-* `This tutorial `_ shows how to install and configure the Geofence Internal Server plug-in. It shows how to create rules in two ways: using the GUI and REST methods.
-
-* GeoFence Rules can be created / updated / deleted through a REST API, accessible only by a GeoServer Admin user. You can find more details on how the GeoFence REST API works `here `_.
-
-GeoFence Rules Storage Configuration
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-By default GeoFence is configured to use a filesystem based DB stored on the GeoServer Data Dir ```_.
-
-1. Add ``Java Libraries`` to ``GeoServer``
-
- .. code-block:: shell
-
- wget --no-check-certificate "https://maven.geo-solutions.it/org/hibernatespatial/hibernate-spatial-postgis/1.1.3.2/hibernate-spatial-postgis-1.1.3.2.jar" -O hibernate-spatial-postgis-1.1.3.2.jar
- wget --no-check-certificate "https://repo1.maven.org/maven2/org/postgis/postgis-jdbc/1.3.3/postgis-jdbc-1.3.3.jar" -O postgis-jdbc-1.3.3.jar
-
- cp hibernate-spatial-postgis-1.1.3.2.jar /WEB-INF/lib
- cp postgis-jdbc-1.3.3.jar /WEB-INF/lib
-
- restart geoserver
-
-2. Either create a DB with the updated schema here https://github.com/geoserver/geofence/blob/master/doc/setup/sql/002_create_schema_postgres.sql or enable the hbm2ddl auto creation through the configuration file (see step ``3``)
-
- .. note:: Notice that "update" also creates the tables if they do not exist. In production, however, I would suggest to change it to "validate"
-
- .. code-block:: shell
-
- # If you want to create a new DB for GeoFence
- sudo -u postgres createdb -O geonode geofence; \
- sudo -u postgres psql -d geofence -c 'CREATE EXTENSION postgis;'; \
- sudo -u postgres psql -d geofence -c 'GRANT ALL ON geometry_columns TO PUBLIC;'; \
- sudo -u postgres psql -d geofence -c 'GRANT ALL ON spatial_ref_sys TO PUBLIC;'; \
- sudo -u postgres psql -d geofence -c 'GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO geonode;'
-
-3. Add configuration similar to ``geofence-datasource-ovr.properties`` sample below (if loaded as GeoServer extension)
-
- **/geofence/geofence-datasource-ovr.properties**
-
- .. code-block:: shell
-
- # /* (c) 2019 Open Source Geospatial Foundation - all rights reserved
- # * This code is licensed under the GPL 2.0 license, available at the root
- # * application directory.
- # */
- #
- geofenceVendorAdapter.databasePlatform=org.hibernatespatial.postgis.PostgisDialect
- geofenceDataSource.driverClassName=org.postgresql.Driver
- geofenceDataSource.url=jdbc:postgresql://localhost:5432/geofence
- geofenceDataSource.username=postgres
- geofenceDataSource.password=postgres
- geofenceEntityManagerFactory.jpaPropertyMap[hibernate.default_schema]=public
-
- ################################################################################
- ## Other setup entries
- ################################################################################
- ## hbm2ddl.auto may assume one of these values:
- ## - validate: validates the DB schema at startup against the internal model. May fail on oracle spatial.
- ## - update: updates the schema, according to the internal model. Updating automatically the production DB is dangerous.
- ## - create-drop: drop the existing schema and recreates it according to the internal model. REALLY DANGEROUS, YOU WILL LOSE YOUR DATA.
- ## You may want not to redefine the property entirely, in order to leave the default value (no action).
-
- geofenceEntityManagerFactory.jpaPropertyMap[hibernate.hbm2ddl.auto]=update
- geofenceEntityManagerFactory.jpaPropertyMap[javax.persistence.validation.mode]=none
- geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.apply_to_ddl]=false
- geofenceEntityManagerFactory.jpaPropertyMap[hibernate.validator.autoregister_listeners]=false
-
- ##
- ## ShowSQL is set to true in the configuration file; putting showsql=false in
- ## this file, you can easily check that this override file has been properly applied.
-
- # geofenceVendorAdapter.generateDdl=false
- # geofenceVendorAdapter.showSql=false
-
- ## Set to "true" in specific use cases
- # workspaceConfigOpts.showDefaultGroups=false
-
-
-
- ################################################################################
- ## Disable second level cache.
- ## This is needed in a geofence-clustered environment.
-
- #geofenceEntityManagerFactory.jpaPropertyMap[hibernate.cache.use_second_level_cache]=false
-
- ################################################################################
- ## Use external ehcache configuration file.
- ## Useful to change cache settings, for example diskStore path.
- #geofenceEntityManagerFactory.jpaPropertyMap[hibernate.cache.provider_configuration_file_resource_path]=file:/path/to/geofence-ehcache-override.xml
diff --git a/advanced/contrib/index.rst b/advanced/contrib/index.rst
deleted file mode 100644
index 9f270c1a..00000000
--- a/advanced/contrib/index.rst
+++ /dev/null
@@ -1,307 +0,0 @@
-Geonode auth via LDAP
-=====================
-
-This package provides utilities for using LDAP as an authentication and
-authorization backend for geonode.
-
-The `django_auth_ldap `_ package is a very capable way to add LDAP integration
-with django projects. It provides a lot of flexibility in mapping LDAP users to
-geonode users and is able to manage user authentication.
-
-However, in order to provide full support for mapping LDAP groups with
-geonode's and enforce group permissions on resources, a custom geonode
-authentication backend is required. This contrib package provides such a
-backend, based on `django_auth_ldap `_.
-
-
-Installation
-------------
-
-Installing this contrib package is a matter of:
-
-1. Installing geonode
-2. Installing system LDAP libraries (development packages needed)
-3. Cloning this repository locally
-4. Change to the `ldap` directory and install this contrib package
-
-.. code-block:: sh
-
- # 1. install geonode (not shown here for brevity)
- # 2. install systemwide LDAP libraries
- sudo apt install \
- libldap2-dev \
- libsasl2-dev
-
- # 3. get geonode/contribs code
- git clone https://github.com/GeoNode/geonode-contribs.git
-
- # 4. install geonode ldap contrib package
- cd geonode-contribs/ldap
- pip install .
-
-Configuration
--------------
-
-1. Add ``geonode_ldap.backend.GeonodeLdapBackend`` as an additional auth
- backend.
-
- .. code-block:: python
-
- # e.g. by updating your settings.py or local_settings.py
- AUTHENTICATION_BACKENDS += (
- "geonode_ldap.backend.GeonodeLdapBackend",
- )
-
- You may use additional auth backends, the django authentication framework
- tries them all according to the order listed in the settings. This means that
- geonode can be setup in such a way as to permit internal organization users
- to login with their LDAP credentials, while at the same time allowing for
- casual users to use their facebook login (as long as you enable facebook
- social auth provider).
-
- .. note:: The django's ``django.contrib.auth.backends.ModelBackend`` must also be used in order to provide full geonode integration with LDAP.
- However this is included by default on GeoNode ``settings``
-
- .. code-block:: python
-
- # The GeoNode default settings are the following
- AUTHENTICATION_BACKENDS = (
- 'oauth2_provider.backends.OAuth2Backend',
- 'django.contrib.auth.backends.ModelBackend',
- 'guardian.backends.ObjectPermissionBackend',
- 'allauth.account.auth_backends.AuthenticationBackend',
- )
-
-2. Set some additional configuration values. Some of these variables are
- prefixed with ``AUTH_LDAP`` (these are used directly by `django_auth_ldap `_)
- while others are prefixed with ``GEONODE_LDAP`` (these are used by
- ``geonode_ldap``). The geonode custom variables are:
-
- * ``GEONODE_LDAP_GROUP_PROFILE_FILTERSTR`` - This is an LDAP search fragment
- with the filter that allows querying for existing groups. See example below
-
- * ``GEONODE_LDAP_GROUP_NAME_ATTRIBUTE`` - This is the name of the LDAP
- attribute that will be used for deriving the geonode group name. If not
- specified it will default to `cn`, which means that the LDAP object's
- `common name` will be used for generating the name of the geonode group
-
- * ``GEONODE_LDAP_GROUP_PROFILE_MEMBER_ATTR`` - This is the name of the LDAP
- attribute that will be used for deriving the geonode membership. If not
- specified it will default to ``member``
-
-
-Example configuration:
-
-.. code-block:: python
-
- # add these import lines to the top of your geonode settings file
- from django_auth_ldap import config as ldap_config
- from geonode_ldap.config import GeonodeNestedGroupOfNamesType
- import ldap
-
- # enable logging
- import logging
- logger = logging.getLogger('django_auth_ldap')
- logger.addHandler(logging.StreamHandler())
- logger.setLevel(logging.DEBUG)
-
- # add both standard ModelBackend auth and geonode.contrib.ldap auth
- AUTHENTICATION_BACKENDS += (
- 'geonode_ldap.backend.GeonodeLdapBackend',
- )
-
- # django_auth_ldap configuration
- AUTH_LDAP_SERVER_URI = os.getenv("LDAP_SERVER_URL")
- AUTH_LDAP_BIND_DN = os.getenv("LDAP_BIND_DN")
- AUTH_LDAP_BIND_PASSWORD = os.getenv("LDAP_BIND_PASSWORD")
- AUTH_LDAP_USER_SEARCH = ldap_config.LDAPSearch(
- os.getenv("LDAP_USER_SEARCH_DN"),
- ldap.SCOPE_SUBTREE,
- os.getenv("LDAP_USER_SEARCH_FILTERSTR")
- )
- # should LDAP groups be used to spawn groups in GeoNode?
- AUTH_LDAP_MIRROR_GROUPS = strtobool(os.getenv("LDAP_MIRROR_GROUPS", 'True'))
- AUTH_LDAP_GROUP_SEARCH = ldap_config.LDAPSearch(
- os.getenv("LDAP_GROUP_SEARCH_DN"),
- ldap.SCOPE_SUBTREE,
- os.getenv("LDAP_GROUP_SEARCH_FILTERSTR")
- )
- AUTH_LDAP_GROUP_TYPE = GeonodeNestedGroupOfNamesType()
- AUTH_LDAP_USER_ATTR_MAP = {
- "first_name": "givenName",
- "last_name": "sn",
- "email": "mailPrimaryAddress"
- }
- AUTH_LDAP_FIND_GROUP_PERMS = True
- AUTH_LDAP_MIRROR_GROUPS_EXCEPT = [
- "test_group"
- ]
-
- # these are not needed by django_auth_ldap - we use them to find and match
- # GroupProfiles and GroupCategories
- GEONODE_LDAP_GROUP_NAME_ATTRIBUTE = os.getenv("LDAP_GROUP_NAME_ATTRIBUTE", default="cn")
- GEONODE_LDAP_GROUP_PROFILE_FILTERSTR = os.getenv("LDAP_GROUP_SEARCH_FILTERSTR", default='(ou=research group)')
- GEONODE_LDAP_GROUP_PROFILE_MEMBER_ATTR = os.getenv("LDAP_GROUP_PROFILE_MEMBER_ATTR", default='member')
-
-Example environment variables:
-
-.. code-block:: shell
-
- LDAP_SERVER_URL=ldap://
- LDAP_BIND_DN=uid=ldapinfo,cn=users,dc=ad,dc=example,dc=org
- LDAP_BIND_PASSWORD=
- LDAP_USER_SEARCH_DN=dc=ad,dc=example,dc=org
- LDAP_USER_SEARCH_FILTERSTR=(&(uid=%(user)s)(objectClass=person))
- LDAP_MIRROR_GROUPS=True
- LDAP_GROUP_SEARCH_DN=cn=groups,dc=ad,dc=example,dc=org
- LDAP_GROUP_SEARCH_FILTERSTR=(|(cn=abt1)(cn=abt2)(cn=abt3)(cn=abt4)(cn=abt5)(cn=abt6))
- LDAP_GROUP_PROFILE_MEMBER_ATTR=uniqueMember
-
-The configuration seen in the example above will allow LDAP users to login to
-geonode with their LDAP credentials.
-
-On first login, a geonode user is created from the LDAP user and its LDAP
-attributes ``cn`` and ``sn`` are used to populate the geonode user's
-``first_name`` and ``last_name`` profile fields.
-
-Any groups that the user is a member of in LDAP (under the
-``cn=groups,dc=ad,dc=example,dc=org`` search base and belonging to one of
-``(|(cn=abt1)(cn=abt2)(cn=abt3)(cn=abt4)(cn=abt5)(cn=abt6))`` groups) will be mapped to the corresponding
-geonode groups, even creating these groups in geonode in case they do not
-exist yet. The geonode user is also made a member of these geonode groups.
-
-Upon each login, the user's geonode group memberships are re-evaluated
-according to the information extracted from LDAP. The
-``AUTH_LDAP_MIRROR_GROUPS_EXCEPT`` setting can be used to specify groups
-whose memberships will not be re-evaluated.
-
-If no LDAP groups shall be mirrored ``LDAP_MIRROR_GROUPS`` and ``LDAP_MIRROR_GROUPS_EXCEPT`` must be set to ``False``.
-
-.. note:: Users mapped from LDAP will be marked with an ``ldap`` tag. This will be used to keep them in sync.
-
-.. warning:: If you remove the ``ldap`` tag, the users will be threaten as pure internal GeoNode ones.
-
-You may also manually generate the geonode groups in advance, before users
-login. In this case, when a user logs in and the mapped LDAP group already
-exists, the user is merely added to the geonode group
-
-Be sure to check out `django_auth_ldap `_ for more information on the various
-configuration options.
-
-Keep Users and Groups Synchronized
-----------------------------------
-
-In order to constantly keep the remote LDAP Users and Groups **synchronized** with GeoNode,
-you will need to run periodically some specific management commands.
-
-.. code-block:: shell
-
- */10 * * * * /opt/geonode/my-geonode/manage.sh updateldapgroups >> /var/log/cron.log 2>&1
- */10 * * * * /opt/geonode/my-geonode/manage.sh updateldapusers >> /var/log/cron.log 2>&1
-
-Where the ``manage.sh`` is a bash script similar to the following one:
-
-**manage.sh**
-
-.. code-block:: shell
-
- export $(grep -v '^#' /opt/geonode/my-geonode/.env | xargs -d '\n'); /home//.virtualenvs/geonode/bin/python /opt/geonode/my-geonode/manage.py $@
-
-and the ``/opt/geonode/my-geonode/.env`` is something similar to the following one:
-
-**/opt/geonode/my-geonode/.env**
-
-.. code-block:: shell
-
- DEBUG=False
- DJANGO_ALLOWED_HOSTS=,localhost,127.0.0.1
- DJANGO_DATABASE_URL=postgis://my_geonode:**********@localhost:5432/my_geonode_db
- DEFAULT_BACKEND_UPLOADER=geonode.importer
- DEFAULT_FROM_EMAIL=geonode@example.org
- DJANGO_EMAIL_HOST=smtp.example.org
- DJANGO_EMAIL_HOST_PASSWORD=**********
- DJANGO_EMAIL_HOST_USER=geonode
- DJANGO_EMAIL_PORT=465
- DJANGO_EMAIL_USE_SSL=True
- DJANGO_SETTINGS_MODULE=my_geonode.settings
- DJANGO_SECRET_KEY=**********
- OAUTH2_API_KEY=**********
- PROXY_URL=/proxy/?url=
- EXIF_ENABLED=True
- EMAIL_ENABLE=True
- TIME_ENABLED=True
- ACCOUNT_OPEN_SIGNUP=True
- ACCOUNT_APPROVAL_REQUIRED=True
- ACCOUNT_EMAIL_REQUIRED=True
- ACCOUNT_EMAIL_VERIFICATION=optional
- AVATAR_GRAVATAR_SSL=True
- GEONODE_DB_URL=postgis://my_geonode:**********@localhost:5432/my_geonode_data
- GEOSERVER_ADMIN_PASSWORD=**********
- GEOSERVER_LOCATION=https:///geoserver/
- GEOSERVER_PUBLIC_HOST=
- GEOSERVER_PUBLIC_LOCATION=https:///geoserver/
- GEOSERVER_WEB_UI_LOCATION=https:///geoserver/
- LDAP_SERVER_URL=ldap://
- LDAP_BIND_DN=uid=ldapinfo,cn=users,dc=ad,dc=example,dc=org
- LDAP_BIND_PASSWORD=
- LDAP_USER_SEARCH_DN=dc=ad,dc=example,dc=org
- LDAP_USER_SEARCH_FILTERSTR=(&(uid=%(user)s)(objectClass=person))
- LDAP_MIRROR_GROUPS=True
- LDAP_GROUP_SEARCH_DN=cn=groups,dc=ad,dc=example,dc=org
- LDAP_GROUP_SEARCH_FILTERSTR=(|(cn=abt1)(cn=abt2)(cn=abt3)(cn=abt4)(cn=abt5)(cn=abt6))
- LDAP_GROUP_PROFILE_MEMBER_ATTR=uniqueMember
- OGC_REQUEST_MAX_RETRIES=3
- OGC_REQUEST_POOL_CONNECTIONS=100
- OGC_REQUEST_POOL_MAXSIZE=100
- OGC_REQUEST_TIMEOUT=60
- SITEURL=https:///
- SITE_HOST_NAME=
- FREETEXT_KEYWORDS_READONLY=False
- # Advanced Workflow Settings
- ADMIN_MODERATE_UPLOADS=False
- GROUP_MANDATORY_RESOURCES=False
- GROUP_PRIVATE_RESOURCES=False
- RESOURCE_PUBLISHING=False
-
-.. note:: You might want to use the same ``/opt/geonode/my-geonode/.env`` for your ``UWSGI`` configuration too:
-
- .. code-block:: shell
-
- [uwsgi]
- socket = 0.0.0.0:8000
- uid =
- gid = www-data
-
- plugins = python3
- virtualenv = /home//.virtualenvs/geonode
-
- # set environment variables from .env file
- env LANG=en_US.utf8
- env LC_ALL=en_US.UTF-8
- env LC_LANG=en_US.UTF-8
-
- for-readline = /opt/geonode/my-geonode/.env
- env = %(_)
- endfor =
-
- chdir = /opt/geonode/my-geonode
- module = my_geonode.wsgi:application
-
- processes = 12
- threads = 2
- enable-threads = true
- master = true
-
- # logging
- # path to where uwsgi logs will be saved
- logto = /storage/my_geonode/logs/geonode.log
- daemonize = /storage/my_geonode/logs/geonode.log
- touch-reload = /opt/geonode/my-geonode/my_geonode/wsgi.py
- buffer-size = 32768
- max-requests = 500
- harakiri = 300 # respawn processes taking more than 5 minutes (300 seconds)
- # limit-as = 1024 # avoid Errno 12 cannot allocate memory
- harakiri-verbose = true
- vacuum = true
- thunder-lock = true
-
diff --git a/advanced/hardening/index.rst b/advanced/hardening/index.rst
deleted file mode 100644
index 18ee4c22..00000000
--- a/advanced/hardening/index.rst
+++ /dev/null
@@ -1,38 +0,0 @@
-.. _geonode_on_https:
-
-Publish on other than HTTP port (for e.g. 8082)
-===============================================
-
-By default geonode will be installed in the port 80 (i.e. HTTP) port. But what if you want to change the port of the geonode to other than HTTP port (For this example, I am taking 8082 port)? We need to edit couple of things in the web configuration. First things is, we need to update the `/etc/uwsgi/apps-enabled/geonode.ini` file,
-
-.. code-block:: shell
-
- sudo vi /etc/uwsgi/apps-enabled/geonode.ini
-
-Edit the following lines,
-
-.. code-block:: shell
-
- env = SITE_HOST_NAME=localhost:8082
- env = SITEURL=http://localhost:8082
-
- SITE_HOST_NAME=localhost
- SITE_HOST_PORT=8082
- GEOSERVER_WEB_UI_LOCATION=http://localhost:8082/geoserver/
- GEOSERVER_PUBLIC_LOCATION=http://localhost:8082/geoserver/
-
-
-
-After that we need to update the `/etc/nginx/sites-enabled/geonode` file,
-
-.. code-block:: shell
-
- sudo vi /etc/nginx/sites-enabled/geonode
-
-Edit the following lines,
-
-.. code-block:: shell
-
- server {
- listen 8082 default_server;
- listen [::]:8082 default_server;
diff --git a/advanced/index.rst b/advanced/index.rst
deleted file mode 100644
index 98807e69..00000000
--- a/advanced/index.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-GeoNode Components and Architecture
-===================================
-
-.. toctree::
- :caption: GeoNode Components and Architecture
- :maxdepth: 3
-
- components/index
-
-Hardening GeoNode
-=================
-
-.. toctree::
- :caption: Hardening GeoNode
- :maxdepth: 3
-
- hardening/index
-
-Social Login
-============
-
-.. toctree::
- :caption: Social Login
- :maxdepth: 3
-
- social/index
-
-GeoNode Django Contrib Apps
-===========================
-
-.. toctree::
- :caption: GeoNode Django Contrib Apps
- :maxdepth: 3
-
- contrib/index
-
diff --git a/advanced/social/index.rst b/advanced/social/index.rst
deleted file mode 100644
index 7c1f244a..00000000
--- a/advanced/social/index.rst
+++ /dev/null
@@ -1,112 +0,0 @@
-GeoNode Social Accounts
-=======================
-
-.. contents::
- :depth: 4
-
-Allow GeoNode to Login throguh Social Accounts (OIDC)
------------------------------------------------------
-
-Introduction
-~~~~~~~~~~~~
-
- Through the so-called "social accounts," GeoNode allows authentication through external providers that support the OIDC (OpenID Connect) protocol, such as Google and Microsoft Azure.
-
- How does it work? Once the authentication provider is configured, GeoNode's sign-on will display a new login button that redirects the user to the external authentication page. After successfully authenticating with the external provider and accepting privacy consents, the browser will redirect the user back to the GeoNode page, prompting them to enter any missing information the first time and automatically authenticating them on subsequent occasions.
-
-
-Usage
-~~~~~
-
- Once the provider has been correctly configured (see below), GeoNode will allow the user to login through it.
-
- The first time you login you will probably need to confirm you `e-mail` and other fields of the `profile`.
-
- .. note::
-
- If you want a user to be automatically signed as a member of a group, you will need to:
-
- 1. Create the `GroupProfile` in GeoNode
- 2. Provide the `groups` or `roles` the user belongs to throguh the `id_token` or `user_info` metadata from the `OIDC` provider itself.
-
- Notice that, in the case you would like to benefit from this functionality:
-
- 1. Every time the user sing-in again, the groups will be automatically re-assigned by GeoNode, and therefore it won't be possible to assign them manually anymore.
- 2. If you need a user to be recognized as a `manager` of the `groups` declared from the provider, you will need to send a claim `is_manager: True` on the user info metadata.
-
-Quick Configuration
-~~~~~~~~~~~~~~~~~~~
-
- Currently GeoNode comes with two predefined configurations that you can use to enable either Google or Microsoft Azure.
-
- **Google**
-
- 1. Add to your `.env` the following settings
-
- .. code-block:: shell
-
- SOCIALACCOUNT_OIDC_PROVIDER_ENABLED=True
- SOCIALACCOUNT_PROVIDER=google
-
-
- 2. Login into GeoNode as an `admin`, go to the `Social Account` settings, create a new `geonode_openid_connect` provider and insert the
-
- .. code-block:: shell
-
- Client ID
- Client Secret
-
- **Microsoft Azure**
-
- 1. Add to your `.env` the following settings
-
- .. code-block:: shell
-
- MICROSOFT_TENANT_ID=
- SOCIALACCOUNT_OIDC_PROVIDER_ENABLED=True
- SOCIALACCOUNT_PROVIDER=azure
-
- 2. Login into GeoNode as an `admin`, go to the `Social Account` settings, create a new `geonode_openid_connect` provider and insert the
-
- .. code-block:: shell
-
- Client ID
- Client Secret
-
-Advanced Configuration
-~~~~~~~~~~~~~~~~~~~~~~
-
- In the case you need to change the default behavior of GeoNode or add a new/custom OIDC provider, you will need to update the `settings` manually as follows.
-
- .. code-block:: python
-
- SOCIALACCOUNT_PROVIDERS = {
- SOCIALACCOUNT_OIDC_PROVIDER: {
- "NAME": "Your Custom Provider",
- "SCOPE": [
- # Custom scopes comma-separated
- ],
- "AUTH_PARAMS": {
- # Custom AUTH PARAMS
- },
- "COMMON_FIELDS": {"email": "email", "last_name": "family_name", "first_name": "given_name"}, # Custom common fields mappings
- "IS_MANAGER_FIELD": "the_custom_manager_claim", # This is optional
- "ACCOUNT_CLASS": "the_custom_account_class",
- "ACCESS_TOKEN_URL": "the_custom_token_uri",
- "AUTHORIZE_URL": "the_custom_auth_uri",
- "ID_TOKEN_ISSUER": "the_custom_uri", # or "PROFILE_URL": "the_custom_user_info_uri"; if you specify the "ID_TOKEN_ISSUER" this will take precedence
- "OAUTH_PKCE_ENABLED": True,
- }
- }
-
- .. note::
-
- If you specify the "ID_TOKEN_ISSUER" this will take precedence trying to fetch the user info metadata from the `id_token`.
-
- If the `id_token` won't be available, it will try to fallback to the "PROFILE_URL" uri.
-
- In the case you will need to customzie how the `Adapter` works and manages the `Groups` registration, you can inject a new class throguh the settings:
-
- .. code:: shell
-
- SOCIALACCOUNT_ADAPTER="geonode.people.adapters.GenericOpenIDConnectAdapter" # This is the default value
diff --git a/basic/docker_env_vars/index.rst b/basic/docker_env_vars/index.rst
deleted file mode 100644
index fbadbda3..00000000
--- a/basic/docker_env_vars/index.rst
+++ /dev/null
@@ -1,179 +0,0 @@
-.. _dockerenvvars:
-
-==============================
-Docker Environmental variables
-==============================
-
-This list reports the specific environmental variables requried for the configuration and execution of GeoNode Docker services
-
-.. comment:
- :local:
- :depth: 1
-
-*********
-Geoserver
-*********
-DATABASE_HOST
- | Default: ``db``
-
- Internal IP or hostname for the PosgreSQL (``db``) Docker container.
-
-DATABASE_PORT
- | Default: ``django``
-
- Internal port for the PosgreSQL (``db``) Docker container.
-
-GEONODE_LB_HOST_IP
- | Default: ``django``
-
- Internal IP or hostname for the GeoNode (``django``) Docker container.
-
-GEONODE_LB_PORT
- | Default: ``8000``
-
- Internal port for the GeoNode (``django``) Docker container.
-
-GEONODE_GEODATABSE
- | Default: ``geonode_data``
-
- GeoNode geodatabase name.
-
-GEONODE_GEODATABASE_USER
- | Default: ``geonode_data``
-
- GeoNode geodatabase user.
-
-GEONODE_GEODATABASE_PASSWORD
- | Default: ``geonode_data``
-
- GeoNode geodatabase password.
-
-GEONODE_GEODATABASE_SCHEMA
- | Default: ``publix``
-
- GeoNode geodatabase schema.
-
-GEOSERVER_JAVA_OPTS
- | Default: ``'-Djava.awt.headless=true -Xms4G -Xmx4G -Dgwc.context.suffix=gwc -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=/var/log/jvm.log -XX:PerfDataSamplingInterval=500 -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UseGCOverheadLimit -XX:ParallelGCThreads=4 -Dfile.encoding=UTF8 -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=false -DGS-SHAPEFILE-CHARSET=UTF-8 -DGEOSERVER_CSRF_DISABLED=true -DPRINT_BASE_URL={geoserver_ui}/geoserver/pdf -DALLOW_ENV_PARAMETRIZATION=true -Xbootclasspath/a:/usr/local/tomcat/webapps/geoserver/WEB-INF/lib/marlin-0.9.3-Unsafe.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine'``
- Geoserver JAVA OPTS.
-
-GEOSERVER_LB_HOST_IP
- | Default: ``geoserver``
-
- Internal IP or hostname for the GeoNode (``geoserver``) Docker container.
-
-GEOSERVER_LB_PORT
- | Default: ``8080``
-
- Internal port for the GeoNode (``geoserver``) Docker container.
-
-NGINX_BASE_URL
- | Default: ``http(s):/localhost``
-
- Public URL of the ``nginx`` service. This value must match GeoNodes's ``SITEURL`` setting
-
-OAUTH2_API_KEY
- | Default: ``(empty)``
-
- Optionsl API Key for the communication between Geoserver and GeoNode Oauth2 services.
-
-OAUTH2_CLIENT_ID
- | Default: ``(empty)``
-
- Geoserer Client ID for GeoNode Oauth2 server. Cannot be empty.
-
-OAUTH2_CLIENT_SECRET
- | Default: ``(empty)``
-
- Geoserer Client secret for GeoNode Oauth2 server. Cannot be empty.
-
-*****
-Nginx
-*****
-
-GEONODE_LB_HOST_IP
- | Default: ``django``
-
- Internal IP or hostname for the GeoNode (``django``) Docker container.
-
-GEONODE_LB_PORT
- | Default: ``8000``
-
- Internal port for the GeoNode (``django``) Docker container.
-
-GEOSERVER_LB_HOST_IP
- | Default: ``geoserver``
-
- Internal IP or hostname for the GeoNode (``geoserver``) Docker container.
-
-GEOSERVER_LB_PORT
- | Default: ``8080``
-
- Internal port for the GeoNode (``geoserver``) Docker container.
-
-HTTPS_HOST
- | Default: ``localhost``
-
- The publis hostname for HTTPS (wihtout ``http:/`` scheme prefix).
-
-HTTPS_HOST
- | Default: ``localhost``
-
- The publis hostname for HTTPS (wihtout ``https:/`` scheme prefix).
-
-HTTP_PORT
- | Default: ``80``
-
- Host port on which to expose the Nginx service for HTTP.
-
-HTTPS_PORT
- | Default: ``443``
-
- Host port on which to expose the Nginx service for HTTPS.
-
-
-LETSENCRYPT_MODE
- | Default: ``disabled``
-
- Possible values: ``disabled`` (SSL disabled), ``staging`` (SSL local cert), ``production`` (SSL released by an ACME server)
-
-********************
-PostgreSQL / PostGIS
-********************
-
-GEONODE_DATABASE
- | Default: ``geonode``
-
- GeoNode database name.
-
-GEONODE_DATABASE_USER
- | Default: ``geonode_data``
-
- GeoNode database user.
-
-GEONODE_DATABASE_PASSWORD
- | Default: ``geonode_data``
-
- GeoNode database password.
-
-GEONODE_GEODATABSE
- | Default: ``geonode_data``
-
- GeoNode geodatabase name.
-
-GEONODE_GEODATABASE_USER
- | Default: ``geonode_data``
-
- GeoNode geodatabase user.
-
-GEONODE_GEODATABASE_PASSWORD
- | Default: ``geonode_data``
- GeoNode geodatabase password.
-
-POSTGRES_USER
- | Default: ``geonode_data``
- PostgreSQL admin user.
-
-POSTGRES_USER
- | Default: ``geonode_data``
- PostgreSQL admin password.
diff --git a/basic/index.rst b/basic/index.rst
deleted file mode 100644
index 1f8e960a..00000000
--- a/basic/index.rst
+++ /dev/null
@@ -1,37 +0,0 @@
-GeoNode Settings
-================
-
- :ref:`settings`
-
-.. toctree::
- :hidden:
- :maxdepth: 3
-
- settings/index
-
-Docker Environmental variables
-===============================
-
- :ref:`dockerenvvars`
-
-.. toctree::
- :hidden:
- :maxdepth: 3
-
- docker_env_vars/index
-
-Customize the Look and Feel
-===========================
-
-.. toctree::
- :maxdepth: 3
-
- theme/index
-
-GeoNode permissions
-===================
-
-.. toctree::
- :maxdepth: 3
-
- permissions/index
diff --git a/basic/permissions/index.rst b/basic/permissions/index.rst
deleted file mode 100644
index 76bc22d5..00000000
--- a/basic/permissions/index.rst
+++ /dev/null
@@ -1,112 +0,0 @@
-.. _permissions:
-
-===========
-Permissions
-===========
-
-| Permissions in GeoNode are set per resource, where a resource can be a dataset, a map, a document, a service or a geoapp. The way the permissions are set is the same for all of them.
-
-.. warning::
-
- GeoNode has a set of default permissions that are applied on resource creation **when** you don't explicitly declare them.
- This is particularly relevant when creating and saving a map, where you won't have the possibility to set the its permissions during the creation phase.
- GeoNode can be tuned to make sure that by default the new created resource are not public, this can be done by changing two settings, see `Default view permissions <../settings/index.html#default-anonymous-view-permission>`_ and `Default download permissions <../settings/index.html#default-anonymous-download-permission>`_
-
-Single Resource permissions
----------------------------
-
-| Resource permissions can be generally set from the *resource detail* page. The detail page has a menu item *Share* which is visible to people who are permitted to set permissions on a resource.
-The share link opens a page on the right with a provision to edit user and group permissions on the resource. see picture below
-
-.. figure:: img/change_dataset_permissions.png
- :align: center
- :width: 500
-
- *Change Dataset Permissions*
-
-| The page for setting the permissions, allows addition of users/groups and selection of a permission to assign each of them.
-
-.. figure:: img/resource_permissions_dialogue.png
- :align: center
- :width: 500
-
- *Resource Permission Dialogue*
-
-You can set the following types of permissions:
-
-* *View:* allows to view the resource;
-* *Download* allows to download the resource;
-* *Edit:* allows to change attributes, properties of the datasets features, styles and metadata for the specified resource;
-* *Manage:* allows to update, delete, change permissions, publish and unpublish the resource.
-
-.. warning:: When assigning permissions to a group, all the group members will have those permissions. Be careful in case of editing permissions.
-
-Geo Limits permissions
-----------------------
-
-.. note:: This feature is available **only** when enabling ```GeoServer``` as geospatial backend. Also make sure that the properties ```GEONODE_SECURITY_ENABLED```, ```GEOFENCE_SECURITY_ENABLED``` and ```GEOFENCE_URL``` are correctly set for the ```OGC_SERVER```.
-
-:guilabel:`Geo Limits` are an extension of the GeoNode standard permissions. :guilabel:`Geo Limits` allows the owner of the resource, or the administrator, to restrict users or groups to a specific geographical area, in order to limit the access to the dataset to only the portions contained within that geographic restriction, excluding data outside of it.
-
-In order to be able to set :guilabel:`Geo Limits` you must be an ```administrator``` of the system or the ```owner``` of the resource or you must have ```Manage Permissions``` rights to the resource.
-
-If you have the permissions to set the :guilabel:`Geo Limits`, you should be able to see the permissions section and the globe icon on each user or group.
-
-.. figure:: img/geo_limits_001.png
- :align: center
- :width: 500
-
- *Geo Limits Icon*
-
-You should be able to see an interactive preview of the resource along with few small drawing tools, that allows you to start creating limits on the map manually if you want.
-
-This opens a map dialog, with 3 options at the top:
-
-.. figure:: img/geo_limits_002.png
- :align: center
- :width: 500
-
- *Geo Limits: Preview Window with Drawing Tools*
-
-
-The |edit_icon| icon allows you to draw limits on a map for which a user will be able to see. Click on it to start drawing on the map. Once you are done drawing, click on it again to deactivate drawing mode.
-
-.. |edit_icon| image:: img/edit_icon.png
- :width: 30px
- :height: 30px
- :align: middle
-
-The |delete_icon| icon enables you to remove the limits you have drawn. Click on the limit drawn, and then click the delete icon.
-
-.. |delete_icon| image:: img/delete_icon.png
- :width: 30px
- :height: 30px
- :align: middle
-
-The |refresh_icon| icon removes all changes that are not saved.
-
-.. |refresh_icon| image:: img/refresh_icon.png
- :width: 30px
- :height: 30px
- :align: middle
-
-
-.. figure:: img/geo_limits_003.png
- :align: center
- :width: 500
-
- *Geo Limits: Editing the Geometries*
-
-Once you finished editing your geometries, save them into the DB using the *Save* link in the resource menu.
-
-The user with the specified geometries won't be able from now on to access the whole dataset data.
-
-.. figure:: img/geo_limits_004.png
- :align: center
- :width: 500
-
- *Geo Limits: Geospatial restrictions applies for the user*
-
-.. warning :: The :guilabel:`Geo Limits` will be persisted on GeoNode DB for that resource. That means that everytime you will update the general permissions, also the geospatial restrictions will be applied.
-
- In order to remove the :guilabel:`Geo Limits` for a certain user or group, you can just :guilabel:`Save` an **empty geometry**. This will **delete** the entry from the DB also.
diff --git a/basic/settings/index.rst b/basic/settings/index.rst
deleted file mode 100644
index 295b2bae..00000000
--- a/basic/settings/index.rst
+++ /dev/null
@@ -1,2646 +0,0 @@
-.. _settings:
-
-========
-Settings
-========
-
-Here’s a list of settings available in GeoNode and their default values. This includes settings for some external applications that
-GeoNode depends on.
-
-For most of them, default values are good. Those should be changed only for advanced configurations in production or heavily hardened systems.
-
-The most common ones can be set through ``environment`` variables to avoid touching the ``settings.py`` file at all.
-This is a good practice and also the preferred one to configure GeoNode (and Django apps in general).
-Whenever you need to change them, set the environment variable accordingly (where it is available) instead of overriding it through the ``local_settings``.
-
-.. comment:
- :local:
- :depth: 1
-
-A
-=
-
-ACCESS_TOKEN_EXPIRE_SECONDS
----------------------------
-
- | Default: ``86400``
- | Env: ``ACCESS_TOKEN_EXPIRE_SECONDS``
-
- When a user logs into GeoNode, if no ``ACCESS_TOKEN`` exists, a new one will be created with a default expiration time of ``ACCESS_TOKEN_EXPIRE_SECONDS`` seconds (1 day by default).
-
-ACCOUNT_ADAPTER
----------------
-
- | Default: ``geonode.people.adapters.LocalAccountAdapter``
-
- Custom GeoNode People (Users) Account Adapter.
-
-ACCOUNT_APPROVAL_REQUIRED
--------------------------
-
- | Default: ``False``
- | Env: ``ACCOUNT_APPROVAL_REQUIRED``
-
- If ``ACCOUNT_APPROVAL_REQUIRED`` equals ``True``, newly registered users must be activated by a superuser through the Admin gui, before they can access GeoNode.
-
-ACCOUNT_CONFIRM_EMAIL_ON_GET
-----------------------------
-
- | Default: ``True``
-
- This is a `django-allauth setting `__
- It allows specifying the HTTP method used when confirming e-mail addresses.
-
-ACCOUNT_EMAIL_REQUIRED
-----------------------
-
- | Default: ``True``
-
- This is a `django-allauth setting `__
- which controls whether the user is required to provide an e-mail address upon registration.
-
-ACCOUNT_EMAIL_VERIFICATION
---------------------------
-
- | Default: ``optional``
-
- This is a `django-allauth setting `__
-
-ACCOUNT_LOGIN_REDIRECT_URL
---------------------------
-
- | Default: ``SITEURL``
- | Env: ``LOGIN_REDIRECT_URL``
-
- This is a `django-user-accounts setting `__
- It allows specifying the default redirect URL after a successful login.
-
-ACCOUNT_LOGOUT_REDIRECT_URL
----------------------------
-
- | Default: ``SITEURL``
- | Env: ``LOGOUT_REDIRECT_URL``
-
- This is a `django-user-accounts setting `__
- It allows specifying the default redirect URL after a successful logout.
-
-ACCOUNT_NOTIFY_ON_PASSWORD_CHANGE
----------------------------------
-
- | Default: ``True``
- | Env: ``ACCOUNT_NOTIFY_ON_PASSWORD_CHANGE``
-
- This is a `django-user-accounts setting `__
-
-ACCOUNT_OPEN_SIGNUP
--------------------
-
- | Default: ``True``
- | Env: ``ACCOUNT_OPEN_SIGNUP``
-
- This is a `django-user-accounts setting `__
- Whether or not people are allowed to self-register to GeoNode or not.
-
-ACCOUNT_SIGNUP_FORM_CLASS
--------------------------
-
- | Default: ``geonode.people.forms.AllauthReCaptchaSignupForm``
- | Env: ``ACCOUNT_SIGNUP_FORM_CLASS``
-
- Enabled only when the :ref:`recaptcha_enabled` option is ``True``.
-
- Ref. to :ref:`recaptcha_enabled`
-
-ACTSTREAM_SETTINGS
-------------------
-
- Default::
-
- {
- 'FETCH_RELATIONS': True,
- 'USE_PREFETCH': False,
- 'USE_JSONFIELD': True,
- 'GFK_FETCH_DEPTH': 1,
- }
-
- Actstream Settings.
-
-
-ADDITIONAL_DATASET_FILE_TYPES
------------------------------
-
-External application can define additional supported file type other than the default one declared in the `SUPPORTED_DATASET_FILE_TYPES` .
-
-The variable should be declared in this way in `settings.py` (or via application hook):
-
-
- .. code::
- ADDITIONAL_DATASET_FILE_TYPES=[
- {
- "id": "dummy_type",
- "label": "Dummy Type",
- "format": "dummy",
- "ext": ["dummy"]
- },
- ]
-
-Please rely on geonode.tests.test_utils.TestSupportedTypes for an example
-
-ADMIN_IP_WHITELIST
-----------------------
-
- | Default: ``[]``
-
- When this list is popuplated with a list of IPs or IP ranges (e.g. 192.168.1.0/24) requests from and admin user will be allowe only from IPs matching with the list.
-
-ADMIN_MODERATE_UPLOADS
-----------------------
-
- | Default: ``False``
-
- When this variable is set to ``True``, every uploaded resource must be approved before becoming visible to the public users.
-
- Until a resource is in ``PENDING APPROVAL`` state, only the superusers, owner and group members can access it, unless specific edit permissions have been set for other users or groups.
-
- A ``Group Manager`` *can* approve the resource, but he cannot publish it whenever the setting ``RESOURCE_PUBLISHING`` is set to ``True``.
- Otherwise, if ``RESOURCE_PUBLISHING`` is set to ``False``, the resource becomes accessible as soon as it is approved.
-
-ADMINS_ONLY_NOTICE_TYPES
-------------------------
-
- | Default: ``['monitoring_alert',]``
-
- A list of notification labels that standard users should not either see or set.
-
- Such notifications will be hidden from the notify settings page and automatically set to false for non-superusers.
-
-
-ADVANCED_EDIT_EXCLUDE_FIELD
----------------------------
- | Default: ``[]``
-
- A list of element (item name) to exclude from the Advanced Edit page.
-
- Example:
-
- ``ADVANCED_EDIT_EXCLUDE_FIELD=['title', 'keywords', 'tkeywords']``
-
-
-AGON_RATINGS_CATEGORY_CHOICES
------------------------------
-
- Default::
-
- {
- "maps.Map": {
- "map": "How good is this map?"
- },
- "layers.Layer": {
- "layer": "How good is this layer?"
- },
- "documents.Document": {
- "document": "How good is this document?"
- }
- }
-
-
-ALLOWED_DOCUMENT_TYPES
-----------------------
-
- Default::
-
- ['doc', 'docx', 'gif', 'jpg', 'jpeg', 'ods', 'odt', 'odp', 'pdf', 'png',
- 'ppt', 'pptx', 'rar', 'sld', 'tif', 'tiff', 'txt', 'xls', 'xlsx', 'xml',
- 'zip', 'gz', 'qml']
-
- A list of acceptable file extensions that can be uploaded to the Documents app.
-
-ANONYMOUS_USER_ID
------------------
-
- | Default: ``-1``
- | Env: ``ANONYMOUS_USER_ID``
-
- The id of an anonymous user. This is an django-guardian setting.
-
-API_INCLUDE_REGIONS_COUNT
--------------------------
-
- | Default: ``False``
- | Env: ``API_INCLUDE_REGIONS_COUNT``
-
- If set to ``True``, a counter with the total number of available regions will be added to the API JSON Serializer.
-
-API_LIMIT_PER_PAGE
-------------------
-
- | Default: ``200``
- | Env: ``API_LIMIT_PER_PAGE``
-
- The Number of items returned by the APIs 0 equals no limit. Different from ``CLIENT_RESULTS_LIMIT``, affecting the number of items per page in the resource list.
-
-API_LOCKDOWN
-------------
-
- | Default: ``True``
- | Env: ``API_LOCKDOWN``
-
- If this is set to ``True`` users must be authenticated to get search results when search for for users, groups, categories, regions, tags etc.
- Filtering search results of Resourcebase-objects like Layers, Maps or Documents by one of the above types does not work.
- Attention: If API_LOCKDOWN is set to ``False`` all details can be accessed by anonymous users.
-
-ASYNC_SIGNALS
--------------
-
- | Default: ``False``
- | Env: ``ACCOUNT_NOTIFY_ON_PASSWORD_CHANGE``
-
-AUTH_EXEMPT_URLS
-----------------
-
- Default::
-
- (r'^/?$',
- '/gs/*',
- '/static/*',
- '/o/*',
- '/api/o/*',
- '/api/roles',
- '/api/adminRole',
- '/api/users',
- '/api/layers',)
-
- A tuple of URL patterns that the user can visit without being authenticated.
- This setting has no effect if ``LOCKDOWN_GEONODE`` is not True. For example,
- ``AUTH_EXEMPT_URLS = ('/maps',)`` will allow unauthenticated users to
- browse maps.
-
-AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS
----------------------------------------------------------------
-
- | Default: ``True``
- | Env: ``AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS``
-
- Assign **new** registered users to the contributors group. If set to `False` new registered members will not obtain automatic permissions to create and edit resources.
-
-AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME
----------------------------------------------------------------
-
- | Default: ``True``
- | Env: ``AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME``
-
- Auto assign users to a default ``REGISTERED_MEMBERS_GROUP_NAME`` private group after ``AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_AT``.
-
-AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_AT
--------------------------------------------------------------
-
- | Default: ``activation``
- | Env: ``AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_AT``
- | Options: ``"registration" | "activation" | "login"``
-
- Auto assign users to a default ``REGISTERED_MEMBERS_GROUP_NAME`` private group after {"registration" | "activation" | "login"}.
-
- Notice that whenever ``ACCOUNT_EMAIL_VERIFICATION == True`` and ``ACCOUNT_APPROVAL_REQUIRED == False``, users will be able to register and they became ``active`` already, even if they won't be able to login until the email has been verified.
-
-AUTO_GENERATE_AVATAR_SIZES
---------------------------
-
- | Default: ``20, 30, 32, 40, 50, 65, 70, 80, 100, 140, 200, 240``
-
- An iterable of integers representing the sizes of avatars to generate on upload. This can save rendering time later on if you pre-generate the resized versions.
-
-AVATAR_GRAVATAR_SSL
--------------------
-
- | Default: ``False``
- | Env: ``AVATAR_GRAVATAR_SSL``
- | Options: ``True | False``
-
- Force SSL when loading fallback image from gravatar.com.
-
-AVATAR_DEFAULT_URL
-------------------
-
- | Default: ``/geonode/img/avatar.png``
- | Env: ``AVATAR_GRAVATAR_SSL``
- | Options: ``"filepath to image"``
-
- Allows to set a custom fallback image in case a User has not uploaded a profile image.
- Needs ``AVATAR_PROVIDERS`` to be set correctly.
-
-AVATAR_PROVIDERS
-----------------
-
- | Default:
- .. code-block::
-
- 'avatar.providers.PrimaryAvatarProvider','avatar.providers.GravatarAvatarProvider','avatar.providers.DefaultAvatarProvider'
-
-
- | Env: ``AVATAR_PROVIDERS``
- | Options: ``Avatar provider object``
-
-
- This setting configures in which order gravatar images are loaded. A common use case is the use of a local image over a fallback image loaded from gravatar.com.
- To do so you would change the order like:
-
- .. code-block::
-
- 'avatar.providers.PrimaryAvatarProvider','avatar.providers.DefaultAvatarProvider','avatar.providers.GravatarAvatarProvider'
-
- (DefaultAvatarProvider before GravatarAvatarProvider)
-
-
-B
-=
-
-BING_API_KEY
-------------
-
- | Default: ``None``
- | Env: ``BING_API_KEY``
-
- This property allows to enable a Bing Aerial background.
-
- If using ``mapstore`` client library, make sure the ``MAPSTORE_BASELAYERS`` include the following:
-
- .. code-block:: python
-
- if BING_API_KEY:
- BASEMAP = {
- "type": "bing",
- "title": "Bing Aerial",
- "name": "AerialWithLabels",
- "source": "bing",
- "group": "background",
- "apiKey": "{{apiKey}}",
- "visibility": False
- }
- DEFAULT_MS2_BACKGROUNDS = [BASEMAP,] + DEFAULT_MS2_BACKGROUNDS
-
-
-BROKER_HEARTBEAT
-----------------
-
- | Default: ``0``
-
- Heartbeats are used both by the client and the broker to detect if a connection was closed.
- This is a `Celery setting `__.
-
-
-BROKER_TRANSPORT_OPTIONS
-------------------------
-
- Default::
-
- {
- 'fanout_prefix': True,
- 'fanout_patterns': True,
- 'socket_timeout': 60,
- 'visibility_timeout': 86400
- }
-
- This is a `Celery setting `__.
-
-
-C
-=
-
-CACHES
-------
-
- Default::
-
- CACHES = {
- 'default': {
- 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
- },
- 'resources': {
- 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
- 'TIMEOUT': 600,
- 'OPTIONS': {
- 'MAX_ENTRIES': 10000
- }
- }
- }
-
- A dictionary containing the settings for all caches to be used with Django.
- This is a `Django setting `__
-
- The ``'default'`` cache is disabled because we don't have a mechanism to discriminate between client sessions right now, and we don't want all users fetch the same api results.
-
- The ``'resources'`` is not currently used. It might be helpful for `caching Django template fragments `__ and/or `Tastypie API Caching `__.
-
-
-CACHE_BUSTING_STATIC_ENABLED
-----------------------------
-
- | Default: ``False``
- | Env: ``CACHE_BUSTING_STATIC_ENABLED``
-
- This is a `Django Compressed Manifet storage provided by WhiteNoise `__
- A boolean allowing you to enable the ``WhiteNoise CompressedManifestStaticFilesStorage storage``. This works only on a production system.
-
- .. warning:: This works only if ``DEBUG = False``
-
-
-CASCADE_WORKSPACE
------------------
-
- | Default: ``geonode``
- | Env: ``CASCADE_WORKSPACE``
-
-
-CATALOGUE
----------
-
- A dict with the following keys:
-
- ENGINE: The CSW backend (default is ``geonode.catalogue.backends.pycsw_local``)
- URL: The FULLY QUALIFIED base URL to the CSW instance for this GeoNode
- USERNAME: login credentials (if required)
- PASSWORD: login credentials (if required)
-
- pycsw is the default CSW enabled in GeoNode. pycsw configuration directives
- are managed in the PYCSW entry.
-
-CATALOGUE_METADATA_TEMPLATE
----------------------------
-
- Default : ``catalogue/full_metadata.xml``
-
- A string with the catalogue xml file needed for the metadata.
-
-CATALOGUE_METADATA_XSL
-----------------------
-
- Default : ``'/static/metadataxsl/metadata.xsl``
-
- A string pointing to the XSL used to transform the metadata XML into human readable HTML.
-
-CELERYD_POOL_RESTARTS
----------------------
-
- Default: ``True``
-
- This is a `Celery setting `__.
-
-CELERY_ACCEPT_CONTENT
----------------------
-
- Defaul: ``['json']``
-
- This is a `Celery setting `__.
-
-CELERY_ACKS_LATE
-----------------
-
- Default: ``True``
-
- This is a `Celery setting `__
-
-CELERY_BEAT_SCHEDULE
---------------------
-
- Here you can define your scheduled task.
-
-CELERY_DISABLE_RATE_LIMITS
---------------------------
-
- Default: ``False``
-
- This is a `Celery setting `__.
-
-CELERY_ENABLE_UTC
------------------
-
- Default: ``True``
-
- This is a `Celery setting `__.
-
-CELERY_MAX_CACHED_RESULTS
--------------------------
-
- Default: ``32768``
-
- This is a `Celery setting `__.
-
-CELERY_MESSAGE_COMPRESSION
---------------------------
-
- Default: ``gzip``
-
- This is a `Celery setting `__.
-
-CELERY_RESULT_PERSISTENT
-------------------------
-
- Default: ``False``
-
- This is a `Celery setting `__.
-
-CELERY_RESULT_SERIALIZER
-------------------------
-
- Default: ``json``
-
- This is a `Celery setting `__.
-
-CELERY_SEND_TASK_SENT_EVENT
----------------------------
-
- Default: ``True``
-
- If enabled, a task-sent event will be sent for every task so tasks can be tracked before they are consumed by a worker. This is a `Celery setting `__.
-
-
-CELERY_TASK_ALWAYS_EAGER
-------------------------
-
- Default: ``False if ASYNC_SIGNALS else True``
-
- This is a `Celery setting `__.
-
-CELERY_TASK_CREATE_MISSING_QUEUES
----------------------------------
-
- Default: ``True``
-
- This is a `Celery setting `__.
-
-CELERY_TASK_IGNORE_RESULT
--------------------------
-
- Default: ``True``
-
- This is a `Celery setting `__.
-
-CELERY_TASK_QUEUES
-------------------
-
- Default::
-
- Queue('default', GEONODE_EXCHANGE, routing_key='default'),
- Queue('geonode', GEONODE_EXCHANGE, routing_key='geonode'),
- Queue('update', GEONODE_EXCHANGE, routing_key='update'),
- Queue('cleanup', GEONODE_EXCHANGE, routing_key='cleanup'),
- Queue('email', GEONODE_EXCHANGE, routing_key='email'),
-
- A tuple with registered Queues.
-
-CELERY_TASK_RESULT_EXPIRES
---------------------------
-
- | Default: ``43200``
- | Env: ``CELERY_TASK_RESULT_EXPIRES``
-
- This is a `Celery setting `__.
-
-CELERY_TASK_SERIALIZER
-----------------------
-
- Default: ``json``
- Env: ``CELERY_TASK_SERIALIZER``
-
- This is a `Celery setting `__.
-
-CELERY_TIMEZONE
----------------
-
- | Default: ``UTC``
- | Env: ``TIME_ZONE``
-
- This is a `Celery setting `__.
-
-CELERY_TRACK_STARTED
---------------------
-
- Default: ``True``
-
- This is a `Celery setting `__.
-
-CELERY_WORKER_DISABLE_RATE_LIMITS
----------------------------------
-
- Default: ``False``
-
- Disable the worker rate limits (number of tasks that can be run in a given time frame).
-
-CELERY_WORKER_SEND_TASK_EVENTS
-------------------------------
-
- Default: ``False``
-
- Send events so the worker can be monitored by other tools.
-
-CLIENT_RESULTS_LIMIT
---------------------
-
- | Default: ``5``
- | Env: ``CLIENT_RESULTS_LIMIT``
-
- The Number of results per page listed in the GeoNode search pages. Different from ``API_LIMIT_PER_PAGE``, affecting the number of items returned by the APIs.
-
-CORS_ALLOW_ALL_ORIGINS
-----------------------
-
- | Default: ``False``
- | Env: ``CORS_ALLOW_ALL_ORIGINS``
-
- If set to true `Access-Control-Allow-Origin: *` header is set for any response. A safer option (not managed through env vars at the moment) is `CORS_ALLOWED_ORIGINS`, where a list of hosts can be configured, o `CORS_ALLOWED_ORIGIN_REGEXES`, where the list can contain regexes.
- Notice that the Nginx in front of GeoNode always includes `Access-Control-Allow-Credentials true`. This must also taken into account when CORS is enabled.
-
-CREATE_LAYER
-------------
-
- | Default: ``False``
- | Env: ``CREATE_LAYER``
-
- Enable the create layer plugin.
-
-CKAN_ORIGINS
-------------
-
- Default::
-
- CKAN_ORIGINS = [{
- "label":"Humanitarian Data Exchange (HDX)",
- "url":"https://data.hdx.rwlabs.org/dataset/new?title={name}¬es={abstract}",
- "css_class":"hdx"
- }]
-
- A list of dictionaries that are used to generate the links to CKAN instances displayed in the Share tab. For each origin, the name and abstract format parameters are replaced by the actual values of the ResourceBase object (layer, map, document). This is not enabled by default. To enable, uncomment the following line: SOCIAL_ORIGINS.extend(CKAN_ORIGINS).
-
-CSRF_COOKIE_HTTPONLY
---------------------
-
- | Default: ``False``
- | Env: ``CSRF_COOKIE_HTTPONLY``
-
- Whether to use HttpOnly flag on the CSRF cookie. If this is set to True, client-side JavaScript will not be able to access the CSRF cookie. This is a `Django Setting `__
-
-CSRF_COOKIE_SECURE
-------------------
-
- | Default: ``False``
- | Env: ``CSRF_COOKIE_SECURE``
-
- Whether to use a secure cookie for the CSRF cookie. If this is set to True, the cookie will be marked as “secure,” which means browsers may ensure that the cookie is only sent with an HTTPS connection. This is a `Django Setting `__
-
-CUSTOM_METADATA_SCHEMA
-----------------------
-
- | Default: ``{}``
-
- If present, will extend the available metadata schema used for store
- new value for each resource. By default override the existing one.
- The expected schema is the same as the default
-
-D
-=
-
-DATA_UPLOAD_MAX_NUMBER_FIELDS
------------------------------
-
- Default: ``100000``
-
- Maximum value of parsed attributes.
-
-
-DATASET_DOWNLOAD_HANDLERS
--------------------------
-
- Default: ``[]``
-
- Additional download handlers that provides a link to download the resource
-
-DEBUG
------
-
- | Default: ``False``
- | Env: ``DEBUG``
-
- One of the main features of debug mode is the display of detailed error pages. If your app raises an exception when DEBUG is True, Django will display a detailed traceback, including a lot of metadata about your environment, such as all the currently defined Django settings (from settings.py).
- This is a `Django Setting `__
-
-DEFAULT_ANONYMOUS_DOWNLOAD_PERMISSION
--------------------------------------
-
- Default: ``True``
-
- Whether the uploaded resources should downloadable by default.
-
-DEFAULT_ANONYMOUS_VIEW_PERMISSION
----------------------------------
-
- Default: ``True``
-
- Whether the uploaded resources should be public by default.
-
-DEFAULT_AUTO_FIELD
-------------------
-
- Default: ``django.db.models.AutoField``
-
- Default primary key field type to use for models that don’t have a field with primary_key=True.
- Django documentation https://docs.djangoproject.com/it/3.2/ref/settings/#std:setting-DEFAULT_AUTO_FIELD
-
-DEFAULT_DATASET_DOWNLOAD_HANDLER
---------------------------------
-
- Default: ``geonode.layers.download_handler.DatasetDownloadHandler``
-
- from GeoNode 4.2.x has bee introduced with this issue #11296 and later improved with this issue #11421
- the concept of Download Handler and ofc GeoNode provides a default implementation of it
- which process the download via WPS
-
-DEFAULT_EXTRA_METADATA_SCHEMA
------------------------------
-
- Default
-
- .. code-block:: json
-
- {
- Optional("id"): int,
- "filter_header": object,
- "field_name": object,
- "field_label": object,
- "field_value": object,
- }
-
- Define the default metadata schema used for add to the resource extra metadata without modify the actual model.
- This schema is used as validation for the input metadata provided by the user
-
- - `id`: (optional int): the identifier of the metadata. Optional for creation, required in Upgrade phase
- - `filter_header`: (required object): Can be any type, is used to generate the facet filter header. Is also an identifier.
- - `field_name`: (required object): name of the metadata field
- - `field_label`: (required object): verbose string of the name. Is used as a label in the facet filters.
- - `field_value`: (required object): metadata values
-
- An example of metadata that can be ingested is the follow:
-
- .. code-block:: json
-
- [
- {
- "filter_header": "Bike Brand",
- "field_name": "name",
- "field_label": "Bike Name",
- "field_value": "KTM",
- },
- {
- "filter_header": "Bike Brand",
- "field_name": "name",
- "field_label": "Bike Name",
- "field_value": "Bianchi",
- }
- ]
-
-
-DEFAULT_LAYER_FORMAT
---------------------
-
- | Default: ``image/png``
- | Env: ``DEFAULT_LAYER_FORMAT``
-
- The default format for requested tile images.
-
-
-DEFAULT_MAP_CENTER
-------------------
-
- | Default: ``(0, 0)``
- | Env: ``DEFAULT_MAP_CENTER_X`` ``DEFAULT_MAP_CENTER_Y``
-
- A 2-tuple with the latitude/longitude coordinates of the center-point to use
- in newly created maps.
-
-DEFAULT_MAP_CRS
----------------
-
- | Default: ``EPSG:3857``
- | Env: ``DEFAULT_MAP_CRS``
-
- The default map projection. Default: EPSG:3857
-
-DEFAULT_MAP_ZOOM
-----------------
-
- | Default: ``0``
- | Env: ``DEFAULT_MAP_ZOOM``
-
- The zoom-level to use in newly created maps. This works like the OpenLayers
- zoom level setting; 0 is at the world extent and each additional level cuts
- the viewport in half in each direction.
-
-DEFAULT_MAX_PARALLEL_UPLOADS_PER_USER
------------------------
-
-Default: ``5``
-
-When `uploading datasets <../../usage/managing_datasets/uploading_datasets.html#datasets-uploading>`__,
-this value limits the number os parallel uploads.
-
-The parallelism limit is set during installation using the value of this variable.
-After installation, only an user with administrative rights can change it.
-These limits can be changed in the `admin panel <../../admin/upload-parallelism-limit/index.html#upload-parallelism-limit>`__
-or `accessing by api <../../devel/api/V2/index.html#get--api-v2-upload-parallelism-limits->`__.
-
-
-
-DEFAULT_MAX_UPLOAD_SIZE
------------------------
-
-Default: ``104857600`` (100 MB in bytes)
-
-When `uploading datasets <../../usage/managing_datasets/uploading_datasets.html#datasets-uploading>`__
-or `uploading documents <../../usage/managing_documents/uploading_documents.html#uploading-documents>`__,
-the total size of the uploaded files is verified.
-
-The size limits are set during installation using the value of this variable.
-After installation, only an user with administrative rights can change it.
-These limits can be changed in the `admin panel <../../admin/upload-size-limits/index.html#upload-size-limits>`__
-or `accessing by api <../../devel/api/V2/index.html#get--api-v2-upload-size-limits->`__.
-
-
-DEFAULT_SEARCH_SIZE
--------------------
-
- | Default: ``10``
- | Env: ``DEFAULT_SEARCH_SIZE``
-
- An integer that specifies the default search size when using ``geonode.search`` for querying data.
-
-DEFAULT_WORKSPACE
------------------
-
- | Default: ``geonode``
- | Env: ``DEFAULT_WORKSPACE``
-
- The standard GeoServer workspace.
-
-DELAYED_SECURITY_SIGNALS
-------------------------
-
- | Default: ``False``
- | Env: ``DELAYED_SECURITY_SIGNALS``
-
- This setting only works when ``GEOFENCE_SECURITY_ENABLED`` has been set to ``True`` and GeoNode is making use of the ``GeoServer BACKEND``.
-
- By setting this to ``True``, every time the permissions will be updated/changed for a Layer, they won't be applied immediately but only and only if
- either:
-
- a. A Celery Worker is running and it is able to execute the ``geonode.security.tasks.synch_guardian`` periodic task;
- notice that the task will be executed at regular intervals, based on the interval value defined in the corresponding PeriodicTask model.
-
- b. A periodic ``cron`` job runs the ``sync_security_rules`` management command, or either it is manually executed from the Django shell.
-
- c. The user, owner of the Layer or with rights to change its permissions, clicks on the GeoNode UI button ``Sync permissions immediately``
-
- .. warning:: Layers won't be accessible to public users anymore until the Security Rules are not synchronized!
-
-DISPLAY_COMMENTS
-----------------
-
- | Default: ``True``
- | Env: ``DISPLAY_COMMENTS``
-
- If set to False comments are hidden.
-
-
-DISPLAY_RATINGS
----------------
-
- | Default: ``True``
- | Env: ``DISPLAY_RATINGS``
-
- If set to False ratings are hidden.
-
-DISPLAY_SOCIAL
---------------
-
- | Default: ``True``
- | Env: ``DISPLAY_SOCIAL``
-
- If set to False social sharing is hidden.
-
-DISPLAY_WMS_LINKS
------------------
-
- | Default: ``True``
- | Env: ``DISPLAY_WMS_LINKS``
-
- If set to False direct WMS link to GeoServer is hidden.
-
-DISPLAY_ORIGINAL_DATASET_LINK
------------------------------
-
- | Default: ``True``
- | Env: ``DISPLAY_ORIGINAL_DATASET_LINK``
-
- If set to False original dataset download is hidden.
-
-DOWNLOAD_FORMATS_METADATA
--------------------------
-
- Specifies which metadata formats are available for users to download.
-
- Default::
-
- DOWNLOAD_FORMATS_METADATA = [
- 'Atom', 'DIF', 'Dublin Core', 'ebRIM', 'FGDC', 'ISO',
- ]
-
-DOWNLOAD_FORMATS_VECTOR
------------------------
-
- Specifies which formats for vector data are available for users to download.
-
- Default::
-
- DOWNLOAD_FORMATS_VECTOR = [
- 'JPEG', 'PDF', 'PNG', 'Zipped Shapefile', 'GML 2.0', 'GML 3.1.1', 'CSV',
- 'Excel', 'GeoJSON', 'KML', 'View in Google Earth', 'Tiles',
- ]
-
-DOWNLOAD_FORMATS_RASTER
------------------------
-
- Specifies which formats for raster data are available for users to download.
-
- Default::
-
- DOWNLOAD_FORMATS_RASTER = [
- 'JPEG', 'PDF', 'PNG' 'Tiles',
- ]
-
-E
-=
-
-EMAIL_ENABLE
-------------
-
- | Default: ``False``
-
- Options:
-
- * EMAIL_BACKEND
-
- Default: ``django.core.mail.backends.smtp.EmailBackend``
-
- Env: ``DJANGO_EMAIL_BACKEND``
-
- * EMAIL_HOST
-
- Default: ``localhost``
-
- * EMAIL_PORT
-
- Default: ``25``
-
- * EMAIL_HOST_USER
-
- Default: ``''``
-
- * EMAIL_HOST_PASSWORD
-
- Default: ``''``
-
- * EMAIL_USE_TLS
-
- Default: ``False``
-
- * EMAIL_USE_SSL
-
- Default: ``False``
-
- * DEFAULT_FROM_EMAIL
-
- Default: ``GeoNode ``
-
-EPSG_CODE_MATCHES
------------------
-
- | Default:
-
- .. code-block:: python
-
- {
- 'EPSG:4326': '(4326) WGS 84',
- 'EPSG:900913': '(900913) Google Maps Global Mercator',
- 'EPSG:3857': '(3857) WGS 84 / Pseudo-Mercator',
- 'EPSG:3785': '(3785 DEPRECATED) Popular Visualization CRS / Mercator',
- 'EPSG:32647': '(32647) WGS 84 / UTM zone 47N',
- 'EPSG:32736': '(32736) WGS 84 / UTM zone 36S'
- }
-
- Supported projections human readable descriptions associated to their EPSG Codes.
- This list will be presented to the user during the upload process whenever GeoNode won't be able to recognize a suitable projection.
- Those codes should be aligned to the `UPLOADER` ones and available in GeoServer also.
-
-EXTRA_METADATA_SCHEMA
----------------------
-
- | Default:
-
- .. code-block:: python
-
- EXTRA_METADATA_SCHEMA = {**{
- "map": os.getenv('MAP_EXTRA_METADATA_SCHEMA', DEFAULT_EXTRA_METADATA_SCHEMA),
- "layer": os.getenv('DATASET_EXTRA_METADATA_SCHEMA', DEFAULT_EXTRA_METADATA_SCHEMA),
- "document": os.getenv('DOCUMENT_EXTRA_METADATA_SCHEMA', DEFAULT_EXTRA_METADATA_SCHEMA),
- "geoapp": os.getenv('GEOAPP_EXTRA_METADATA_SCHEMA', DEFAULT_EXTRA_METADATA_SCHEMA)
- }, **CUSTOM_METADATA_SCHEMA}
-
- Variable used to actually get the expected metadata schema for each resource_type.
- In this way, each resource type can have a different metadata schema
-
-F
-=
-
-FREETEXT_KEYWORDS_READONLY
---------------------------
-
- | Default: ``False``
- | Env: ``FREETEXT_KEYWORDS_READONLY``
-
- Make Free-Text Keywords writable from users. Or read-only when set to False.
-
-
-FACET_PROVIDERS
----------------
-
- | Default: ``pre filled list of providers``
- | Env: ``FACET_PROVIDERS``
-
- Contains the list of the providers available to perform an serve the facets.
- In case the user wants remove a facets, is enough to remove the path
- of the proider from the list
-
-
-G
-=
-
-GEOFENCE_SECURITY_ENABLED
--------------------------
-
- | Default: ``True`` (False is Test is true)
- | Env: ``GEOFENCE_SECURITY_ENABLED``
-
- Whether the geofence security system is used.
-
-GEOIP_PATH
-----------
-
- | Default: ``Path to project``
- | Env: ``PROJECT_ROOT``
-
- The local path where GeoIPCities.dat is written to. Make sure your user has to have write permissions.
-
-GEONODE_APPS_ENABLED
---------------------
-
- | Default: ``True``
-
- If enabled contrib apps are used.
- If disabled:
- - the geoapps URLs are not included in the routing paths
- - the geoapps resources are excluded from the search
- - the resource detail are forwarded to the homepage
-
- ``ENABLE -> DISABLE`` transition:
-
- This should be done if the geoapps were enabled in an environment where they are not needed.
-
- ``DISABLE -> ENABLE`` transition:
-
- It should be done only once to enable geoapps in an environment where are needed
-
-GEONODE_CLIENT_LAYER_PREVIEW_LIBRARY
-------------------------------------
-
- Default: ``"mapstore"``
-
- The library to use for display preview images of layers. The library choices are:
-
- ``"mapstore"``
- ``"leaflet"``
- ``"react"``
-
-GEONODE_EXCHANGE
-----------------
-
- | Default:: ``Exchange("default", type="direct", durable=True)``
-
- The definition of Exchanges published by geonode. Find more about Exchanges at `celery docs `__.
-
-GEOSERVER_ADMIN_USER
----------------------------
-
- | Default: ``admin``
- | Env: ``GEOSERVER_ADMIN_PASSWORD``
-
- The geoserver admin username.
-
-GEOSERVER_ADMIN_PASSWORD
------------------------
-
- | Default: ``geoserver``
- | Env: ``GEOSERVER_ADMIN_USER``
-
- The GeoServer admin password.
-
-GEOSERVER_FACTORY_PASSWORD
------------------------
-
- | Default: ``geoserver``
- | Env: ``GEOSERVER_FACTORY_PASSWORD``
-
- The GeoServer admin factory password, required for the first time configuration fo Geoserver (Docker setup).
-
-GEOSERVER_EXCHANGE
-------------------
-
- | Default:: ``Exchange("geonode", type="topic", durable=False)``
-
- The definition of Exchanges published by GeoServer. Find more about Exchanges at `celery docs `__.
-
-GEOSERVER_LOCATION
-------------------
-
- | Default: ``http://localhost:8080/geoserver/``
- | Env: ``GEOSERVER_LOCATION``
-
- Url under which GeoServer is available.
-
-GEOSERVER_PUBLIC_HOST
----------------------
-
- | Default: ``SITE_HOST_NAME`` (Variable)
- | Env: ``GEOSERVER_PUBLIC_HOST``
-
- Public hostname under which GeoServer is available.
-
-GEOSERVER_PUBLIC_LOCATION
--------------------------
-
- | Default: ``SITE_HOST_NAME`` (Variable)
- | Env: ``GEOSERVER_PUBLIC_LOCATION``
-
- Public location under which GeoServer is available.
-
-GEOSERVER_PUBLIC_PORT
----------------------
-
- | Default: ``8080 (Variable)``
- | Env: ``GEOSERVER_PUBLIC_PORT``
-
-
- Public Port under which GeoServer is available.
-
-GEOSERVER_WEB_UI_LOCATION
--------------------------
-
- | Default: ``GEOSERVER_PUBLIC_LOCATION (Variable)``
- | Env: ``GEOSERVER_WEB_UI_LOCATION``
-
- Public location under which GeoServer is available.
-
-GROUP_PRIVATE_RESOURCES
------------------------
-
- | Default: ``False``
- | Env: ``GROUP_PRIVATE_RESOURCES``
-
- If this option is enabled, Resources belonging to a Group won't be visible by others
-
-I
-=
-
-IMPORTER HANDLERS
------------------
-
- | Default: ``pre filled list of handlers``
- | Env: ``IMPORTER_HANDLERS``
-
- Contains the list of the handlers available to perform an import of a resource.
- In case the user wants to drop the support during the import phase, is enough to
- remove the path of the Handler from the list
-
-L
-=
-
-LEAFLET_CONFIG
---------------
-
- A dictionary used for Leaflet configuration.
-
-LICENSES
---------
-
- | Default:
-
- .. code-block:: python
-
- {
- 'ENABLED': True,
- 'DETAIL': 'above',
- 'METADATA': 'verbose',
- }
-
- Enable Licenses User Interface
-
-LOCAL_SIGNALS_BROKER_URL
-------------------------
-
- | Default: ``memory://``
-
-LOCKDOWN_GEONODE
-----------------
-
- | Default: ``False``
- | Env: ``LOCKDOWN_GEONODE``
-
- By default, the GeoNode application allows visitors to view most pages without being authenticated. If this is set to ``True``
- users must be authenticated before accessing URL routes not included in ``AUTH_EXEMPT_URLS``.
-
-LOGIN_URL
----------
-
- | Default: ``{}account/login/'.format(SITEURL)``
- | Env: ``LOGIN_URL``
-
- The URL where requests are redirected for login.
-
-
-LOGOUT_URL
-----------
-
- | Default: ``{}account/login/'.format(SITEURL)``
- | Env: ``LOGOUT_URL``
-
- The URL where requests are redirected for logout.
-
-M
-=
-
-MAP_CLIENT_USE_CROSS_ORIGIN_CREDENTIALS
----------------------------------------
-
- | Default: ``False``
- | Env: ``MAP_CLIENT_USE_CROSS_ORIGIN_CREDENTIALS``
-
- Enables cross origin requests for geonode-client.
-
-MAPSTORE_BASELAYERS
--------------------
-
- | Default:
-
- .. code-block:: python
-
- [
- {
- "type": "osm",
- "title": "Open Street Map",
- "name": "mapnik",
- "source": "osm",
- "group": "background",
- "visibility": True
- }, {
- "type": "tileprovider",
- "title": "OpenTopoMap",
- "provider": "OpenTopoMap",
- "name": "OpenTopoMap",
- "source": "OpenTopoMap",
- "group": "background",
- "visibility": False
- }, {
- "type": "wms",
- "title": "Sentinel-2 cloudless - https://s2maps.eu",
- "format": "image/jpeg",
- "id": "s2cloudless",
- "name": "s2cloudless:s2cloudless",
- "url": "https://maps.geo-solutions.it/geoserver/wms",
- "group": "background",
- "thumbURL": "%sstatic/mapstorestyle/img/s2cloudless-s2cloudless.png" % SITEURL,
- "visibility": False
- }, {
- "source": "ol",
- "group": "background",
- "id": "none",
- "name": "empty",
- "title": "Empty Background",
- "type": "empty",
- "visibility": False,
- "args": ["Empty Background", {"visibility": False}]
- }
- ]
-
- | Env: ``MAPSTORE_BASELAYERS``
-
- Allows to specify which backgrounds MapStore should use. The parameter ``visibility`` for a layer, specifies which one is the default one.
-
- A sample configuration using the Bing background without OpenStreetMap, could be the following one:
-
- .. code-block:: python
-
- [
- {
- "type": "bing",
- "title": "Bing Aerial",
- "name": "AerialWithLabels",
- "source": "bing",
- "group": "background",
- "apiKey": "{{apiKey}}",
- "visibility": True
- }, {
- "type": "tileprovider",
- "title": "OpenTopoMap",
- "provider": "OpenTopoMap",
- "name": "OpenTopoMap",
- "source": "OpenTopoMap",
- "group": "background",
- "visibility": False
- }, {
- "type": "wms",
- "title": "Sentinel-2 cloudless - https://s2maps.eu",
- "format": "image/jpeg",
- "id": "s2cloudless",
- "name": "s2cloudless:s2cloudless",
- "url": "https://maps.geo-solutions.it/geoserver/wms",
- "group": "background",
- "thumbURL": "%sstatic/mapstorestyle/img/s2cloudless-s2cloudless.png" % SITEURL,
- "visibility": False
- }, {
- "source": "ol",
- "group": "background",
- "id": "none",
- "name": "empty",
- "title": "Empty Background",
- "type": "empty",
- "visibility": False,
- "args": ["Empty Background", {"visibility": False}]
- }
- ]
-
- .. warning:: To use a Bing background, you need to correctly set and provide a valid ``BING_API_KEY``
-
-MAX_DOCUMENT_SIZE
------------------
-
- | Default:``2``
- | Env: ``MAX_DOCUMENT_SIZE``
-
- Allowed size for documents in MB.
-
-METADATA_PARSERS
-----------------
-
-Is possible to define multiple XML parsers for ingest XML during the layer upload.
-
-The variable should be declared in this way in `settings.py`:
-
-`METADATA_PARSERS = ['list', 'of', 'parsing', 'functions']`
-
-If you want to always use the default metadata parser and after use your own, the variable must be set with first value as `__DEFAULT__`
-Example:
-
-`METADATA_PARSERS = ['__DEFAULT__', 'custom_parsing_function]`
-
-If not set, the system will use the `__DEFAULT__` parser.
-
-The custom parsing function must be accept in input 6 parameter that are:
-
- | - exml (xmlfile)
- | - uuid (str)
- | - vals (dict)
- | - regions (list)
- | - keywords (list)
- | - custom (dict)
-
-If you want to use your parser after the default one, here is how the variable are populated:
-
- | - exml: the XML file to parse
- | - uuid: the UUID of the layer
- | - vals: Dictionary of information that belong to ResourceBase
- | - regions: List of regions extracted from the XML
- | - keywords: List of dict of keywords already divided between free-text and thesarus
- | - custom: Custom varible
-
-NOTE: the keywords must be in a specific format, since later this dict, will be ingested by the `KeywordHandler` which will assign the keywords/thesaurus to the layer.
-
- .. code::
- {
- "keywords": [list_of_keyword_extracted],
- "thesaurus": {"date": None, "datetype": None, "title": None}, # thesaurus informations
- "type": theme, #extracted theme if present
- }
-
-Here is an example of expected parser function
-
- .. code::
- def custom_parsing_function(exml, uuid, vals, regions, keywords, custom):
- # Place here your code
- return uuid, vals, regions, keywords, custom
-
-For more information, please rely to `TestCustomMetadataParser` which contain a smoke test to explain the functionality
-
-
-METADATA_STORERS
-----------------
-
-Is possible to define multiple Layer storer during the layer upload.
-
-The variable should be declared in this way:
-
-`METADATA_STORERS = ['custom_storer_function']`
-
-NOTE: By default the Layer is always saved with the default behaviour.
-
-The custom storer function must be accept in input 2 parameter that are:
-
- | - Layer (layer model instance)
- | - custom (dict)
-
-Here is how the variable are populated by default:
-
- | - layer (layer model instance) that we wanto to change
- | - custom: custom dict populated by the parser
-
-Here is an example of expected storer function
-
- .. code::
- def custom_storer_function(layer, custom):
- # do something here
- pass
-
-For more information, please rely to `TestMetadataStorers` which contain a smoke test to explain the functionality
-
-
-MISSING_THUMBNAIL
------------------
-
- Default: ``geonode/img/missing_thumb.png``
-
- The path to an image used as thumbnail placeholder.
-
-
-MEMCACHED_BACKEND
------------------
- Default: ``django.core.cache.backends.memcached.PyMemcacheCache``
-
- Define which backend of memcached will be used
-
-
-MEMCACHED_ENABLED
------------------
- Default: ``False``
-
- If True, will use MEMCACHED_BACKEND as default backend in CACHES
-
-
-MODIFY_TOPICCATEGORY
---------------------
-
- Default: ``False``
-
- Metadata Topic Categories list should not be modified, as it is strictly defined
- by ISO (See: http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml
- and check the element).
-
- Some customization is still possible changing the is_choice and the GeoNode
- description fields.
-
- In case it is necessary to add/delete/update categories, it is
- possible to set the MODIFY_TOPICCATEGORY setting to True.
-
-MONITORING_ENABLED
-------------------
-
- Default: ``False``
-
- Enable internal monitoring application (`geonode.monitoring`). If set to `True`, add following code to your local settings:
-
- .. code::
-
- MONITORING_ENABLED = True
- # add following lines to your local settings to enable monitoring
- if MONITORING_ENABLED:
- INSTALLED_APPS + ('geonode.monitoring',)
- MIDDLEWARE_CLASSES + ('geonode.monitoring.middleware.MonitoringMiddleware',)
-
- See :ref:`geonode_monitoring` for details.
-
-.. _monitoring-data-aggregation:
-
-MONITORING_DATA_AGGREGATION
----------------------------
-
- Default:
-
- .. code::
-
- (
- (timedelta(seconds=0), timedelta(minutes=1),),
- (timedelta(days=1), timedelta(minutes=60),),
- (timedelta(days=14), timedelta(days=1),),
- )
-
- Configure aggregation of past data to control data resolution. It lists data age and aggregation in reverse order, by default:
-
- | - for current data, 1 minute resolution
- | - for data older than 1 day, 1-hour resolution
- | - for data older than 2 weeks, 1 day resolution
-
- See :ref:`geonode_monitoring` for further details.
-
- This setting takes effects only if :ref:`user-analytics` is true.
-
-MONITORING_DATA_TTL
--------------------
-
- | Default: ``365``
- | Env: ``MONITORING_DATA_TTL``
-
- How long monitoring data should be stored in days.
-
-MONITORING_DISABLE_CSRF
------------------------
-
- | Default: ``False``
- | Env: ``MONITORING_DISABLE_CSRF``
-
- Set this to true to disable csrf check for notification config views, use with caution - for dev purpose only.
-
-.. _monitoring-skip-paths:
-
-MONITORING_SKIP_PATHS
------------------------
-
- Default:
-
- .. code::
-
- (
- '/api/o/',
- '/monitoring/',
- '/admin',
- '/jsi18n',
- STATIC_URL,
- MEDIA_URL,
- re.compile('^/[a-z]{2}/admin/'),
- )
-
- Skip certain useless paths to not to mud analytics stats too much.
- See :ref:`geonode_monitoring` to learn more about it.
-
- This setting takes effects only if :ref:`user-analytics` is true.
-
-N
-=
-
-NOTIFICATIONS_MODULE
---------------------
-
- Default: ``pinax.notifications``
-
- App used for notifications. (pinax.notifications or notification)
-
-NOTIFICATION_ENABLED
---------------------
-
- | Default: ``True``
- | Env: ``NOTIFICATION_ENABLED``
-
- Enable or disable the notification system.
-
-O
-=
-
-OAUTH2_API_KEY
---------------
-
- | Default: ``None``
- | Env: ``OAUTH2_API_KEY``
-
- In order to protect oauth2 REST endpoints, used by GeoServer to fetch user roles and infos, you should set this key and configure the ``geonode REST role service`` accordingly. Keep it secret!
-
- .. warning:: If not set, the endpoint can be accessed by users without authorization.
-
-OAUTH2_PROVIDER
----------------
-
- Ref.: `OAuth Toolkit settings `__
-
-OAUTH2_PROVIDER_APPLICATION_MODEL
----------------------------------
-
- | Default: ``oauth2_provider.Application``
-
- Ref.: `OAuth Toolkit settings `__
-
-OAUTH2_PROVIDER_ACCESS_TOKEN_MODEL
-----------------------------------
-
- | Default: ``oauth2_provider.AccessToken``
-
- Ref.: `OAuth Toolkit settings `__
-
-OAUTH2_PROVIDER_ID_TOKEN_MODEL
-------------------------------
-
- | Default: ``oauth2_provider.IDToken``
-
- Ref.: `OAuth Toolkit settings `__
-
-OAUTH2_PROVIDER_GRANT_MODEL
----------------------------
-
- | Default: ``oauth2_provider.Grant``
-
- Ref.: `OAuth Toolkit settings `__
-
-OAUTH2_PROVIDER_REFRESH_TOKEN_MODEL
------------------------------------
-
- | Default: ``oauth2_provider.RefreshToken``
-
- Ref.: `OAuth Toolkit settings `__
-
-OGC_SERVER
-----------
-
- Default: ``{}`` (Empty dictionary)
-
- A dictionary of OGC servers and their options. The main
- server should be listed in the 'default' key. If there is no 'default'
- key or if the ``OGC_SERVER`` setting does not exist, Geonode will raise
- an Improperly Configured exception. Below is an example of the ``OGC_SERVER``
- setting::
-
- OGC_SERVER = {
- 'default' : {
- 'LOCATION' : 'http://localhost:8080/geoserver/',
- 'USER' : 'admin',
- 'PASSWORD' : 'geoserver',
- }
- }
-
- * BACKEND
-
- Default: ``"geonode.geoserver"``
-
- The OGC server backend to use. The backend choices are:
-
- ``'geonode.geoserver'``
-
- * BACKEND_WRITE_ENABLED
-
- Default: ``True``
-
- Specifies whether the OGC server can be written to. If False, actions that modify
- data on the OGC server will not execute.
-
- * DATASTORE
-
- Default: ``''`` (Empty string)
-
- An optional string that represents the name of a vector datastore, where Geonode uploads are imported into. To support vector datastore imports there also needs to be an
- entry for the datastore in the ``DATABASES`` dictionary with the same name. Example::
-
- OGC_SERVER = {
- 'default' : {
- 'LOCATION' : 'http://localhost:8080/geoserver/',
- 'USER' : 'admin',
- 'PASSWORD' : 'geoserver',
- 'DATASTORE': 'geonode_imports'
- }
- }
-
- DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': 'development.db',
- },
- 'geonode_imports' : {
- 'ENGINE': 'django.contrib.gis.db.backends.postgis',
- 'NAME': 'geonode_imports',
- 'USER' : 'geonode_user',
- 'PASSWORD' : 'a_password',
- 'HOST' : 'localhost',
- 'PORT' : '5432',
- }
- }
-
- * GEONODE_SECURITY_ENABLED
-
- Default: ``True``
-
- A boolean that represents whether GeoNode's security application is enabled.
-
- * LOCATION
-
- Default: ``"http://localhost:8080/geoserver/"``
-
- A base URL from which GeoNode can construct OGC service URLs.
- If using GeoServer you can determine this by
- visiting the GeoServer administration home page without the
- /web/ at the end. For example, if your GeoServer administration app is at
- http://example.com/geoserver/web/, your server's location is http://example.com/geoserver.
-
- * MAPFISH_PRINT_ENABLED
-
- Default: ``True``
-
- A boolean that represents whether the MapFish printing extension is enabled on the server.
-
- * PASSWORD
-
- Default: ``'geoserver'``
-
- The administrative password for the OGC server as a string.
-
- * PRINT_NG_ENABLED
-
- Default: ``True``
-
- A boolean that represents whether printing of maps and layers is enabled.
-
- * PUBLIC_LOCATION
-
- Default: ``"http://localhost:8080/geoserver/"``
-
- The URL used to in most public requests from Geonode. This setting allows a user to write to one OGC server (the LOCATION setting)
- and read from a separate server or the PUBLIC_LOCATION.
-
- * USER
-
- Default: ``'admin'``
-
- The administrative username for the OGC server as a string.
-
- * WMST_ENABLED
-
- Default: ``False``
-
- Not implemented.
-
- * WPS_ENABLED
-
- Default: ``False``
-
- Not implemented.
-
- * TIMEOUT
-
- Default: ``10``
-
- The maximum time, in seconds, to wait for the server to respond.
-
-OGP_URL
--------
-
- | Default: ``http://geodata.tufts.edu/solr/select``
- | Env: ``OGP_URL``
-
- Endpoint of geodata.tufts.edu getCapabilities.
-
-OPENGRAPH_ENABLED
------------------
-
- Default:: ``True``
-
- A boolean that specifies whether Open Graph is enabled. Open Graph is used by Facebook and Slack.
-
-P
-=
-
-PINAX_NOTIFICATIONS_BACKENDS
-----------------------------
-
- Default: ``("email", _EMAIL_BACKEND, 0),``
-
- Used notification backend. This is a `pinax notification setting: `__
-
-PINAX_NOTIFICATIONS_LOCK_WAIT_TIMEOUT
--------------------------------------
-
- | Default: ``-1``
- | Env: ``NOTIFICATIONS_LOCK_WAIT_TIMEOUT``
-
- It defines how long to wait for the lock to become available. Default of -1 means to never wait for the lock to become available.
- This is a `pinax notification setting: `__
-
-PINAX_NOTIFICATIONS_QUEUE_ALL
------------------------------
-
- | Default: ``-1``
- | Env: ``NOTIFICATIONS_LOCK_WAIT_TIMEOUT``
-
- By default, calling notification.send will send the notification immediately, however, if you set this setting to True, then the default behavior of the send method will be to queue messages in the database for sending via the emit_notices command.
- This is a `pinax notification setting: `__
-
-PINAX_RATINGS_CATEGORY_CHOICES
-------------------------------
-
- Default::
-
- {
- "maps.Map": {
- "map": "How good is this map?"
- },
- "layers.Layer": {
- "layer": "How good is this layer?"
- },
- "documents.Document": {
- "document": "How good is this document?"
- }
- }
-
-
-PROFILE_EDIT_EXCLUDE_FIELD
----------------------------
- | Default: ``[]``
-
- A list of element (item name) to exclude from the Profile Edit page.
-
- Example:
-
- ``PROFILE_EDIT_EXCLUDE_FIELD=['organization', 'language']``
-
-
-PROXY_ALLOWED_HOSTS
--------------------
-
- Default: ``()`` (Empty tuple)
-
- A tuple of strings representing the host/domain names that GeoNode can proxy requests to. This is a security measure
- to prevent an attacker from using the GeoNode proxy to render malicious code or access internal sites.
-
- Values in this tuple can be fully qualified names (e.g. 'www.geonode.org'), in which case they will be matched against
- the request’s Host header exactly (case-insensitive, not including port). A value beginning with a period can be used
- as a subdomain wildcard: ``.geonode.org`` will match geonode.org, www.geonode.org, and any other subdomain of
- geonode.org. A value of '*' will match anything and is not recommended for production deployments.
-
-
-PROXY_URL
----------
-
- Default ``/proxy/?url=``
-
- The URL to a proxy that will be used when making client-side requests in GeoNode. By default, the
- internal GeoNode proxy is used but administrators may favor using their own, less restrictive proxies.
-
-
-PYCSW
------
-
- A dict with pycsw's configuration with two possible keys CONFIGURATION and FILTER.
-
- CONFIGURATION
- Of note are the sections ``metadata:main`` to set CSW server metadata and ``metadata:inspire``
- to set INSPIRE options. Setting ``metadata:inspire['enabled']`` to ``true``
- will enable INSPIRE support. Server level configurations can be overridden
- in the ``server`` section. See http://docs.pycsw.org/en/latest/configuration.html
- for full pycsw configuration details.
-
- FILTER
- Optional settings in order to add a filter to the CSW filtering.
- The filter follow the django orm structure and must be a `ResourceBase` field/related field.
- By default CSW will filter only for `layer` resource_type
-
- Example of PYCSW configuration.
- PYCSW: {
- 'CONFIGURATION': {...},
- 'FILTER': {'resource_type__in':['layer'] }
- }
-
-R
-=
-
-RABBITMQ_SIGNALS_BROKER_URL
----------------------------
-
- Default: ``amqp://localhost:5672``
-
- The Rabbitmq endpoint
-
-.. _recaptcha_enabled:
-
-RECAPTCHA_ENABLED
------------------
-
- | Default: ``False``
- | Env: ``RECAPTCHA_ENABLED``
-
- Allows enabling reCaptcha field on signup form.
- Valid Captcha Public and Private keys will be needed as specified here https://pypi.org/project/django-recaptcha/#installation
-
- You will need to generate a keys pair for ``reCaptcha v2`` for your domain from https://www.google.com/recaptcha/admin/create
-
- More options will be available by enabling this setting:
-
- * **ACCOUNT_SIGNUP_FORM_CLASS**
-
- | Default: ``geonode.people.forms.AllauthReCaptchaSignupForm``
- | Env: ``ACCOUNT_SIGNUP_FORM_CLASS``
-
- Enabled only when the :ref:`recaptcha_enabled` option is ``True``.
-
- * **INSTALLED_APPS**
-
- The ``captcha`` must be present on ``INSTALLED_APPS``, otherwise you'll get an error.
-
- When enabling the :ref:`recaptcha_enabled` option through the ``environment``, this setting will be automatically added by GeoNode as follows:
-
- .. code:: python
-
- if 'captcha' not in INSTALLED_APPS:
- INSTALLED_APPS += ('captcha',)
-
- * **RECAPTCHA_PUBLIC_KEY**
-
- | Default: ``geonode_RECAPTCHA_PUBLIC_KEY``
- | Env: ``RECAPTCHA_PUBLIC_KEY``
-
- You will need to generate a keys pair for ``reCaptcha v2`` for your domain from https://www.google.com/recaptcha/admin/create
-
- For mode details on the reCaptcha package, please see:
-
- #. https://pypi.org/project/django-recaptcha/#installation
- #. https://pypi.org/project/django-recaptcha/#local-development-and-functional-testing
-
- * **RECAPTCHA_PRIVATE_KEY**
-
- | Default: ``geonode_RECAPTCHA_PRIVATE_KEY``
- | Env: ``RECAPTCHA_PRIVATE_KEY``
-
- You will need to generate a keys pair for ``reCaptcha v2`` for your domain from https://www.google.com/recaptcha/admin/create
-
- For mode details on the reCaptcha package, please see:
-
- #. https://pypi.org/project/django-recaptcha/#installation
- #. https://pypi.org/project/django-recaptcha/#local-development-and-functional-testing
-
-RECAPTCHA_PUBLIC_KEY
---------------------
-
- | Default: ``geonode_RECAPTCHA_PUBLIC_KEY``
- | Env: ``RECAPTCHA_PUBLIC_KEY``
-
- You will need to generate a keys pair for ``reCaptcha v2`` for your domain from https://www.google.com/recaptcha/admin/create
-
- Ref. to :ref:`recaptcha_enabled`
-
-RECAPTCHA_PRIVATE_KEY
----------------------
-
- | Default: ``geonode_RECAPTCHA_PRIVATE_KEY``
- | Env: ``RECAPTCHA_PRIVATE_KEY``
-
- You will need to generate a keys pair for ``reCaptcha v2`` for your domain from https://www.google.com/recaptcha/admin/create
-
- Ref. to :ref:`recaptcha_enabled`
-
-REDIS_SIGNALS_BROKER_URL
-------------------------
-
- Default: ``redis://localhost:6379/0``
-
- The Redis endpoint.
-
-REGISTERED_MEMBERS_GROUP_NAME
------------------------------
-
- | Default: ``registered-members``
- | Env: ``REGISTERED_MEMBERS_GROUP_NAME``
-
- Used by ``AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME`` settings.
-
-REGISTERED_MEMBERS_GROUP_TITLE
-------------------------------
-
- | Default: ``Registered Members``
- | Env: ``REGISTERED_MEMBERS_GROUP_TITLE``
-
- Used by ``AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME`` settings.
-
-REGISTRATION_OPEN
------------------
-
- Default: ``False``
-
- A boolean that specifies whether users can self-register for an account on your site.
-
-RESOURCE_PUBLISHING
--------------------
-
- Default: ``False``
-
- By default, the GeoNode application allows GeoNode staff members to
- publish/unpublish resources.
- By default, resources are published when created. When this setting is set to
- True the staff members will be able to unpublish a resource (and eventually
- publish it back).
-
-S
-=
-
-SEARCH_FILTERS
---------------
-
- Default::
-
- 'TEXT_ENABLED': True,
- 'TYPE_ENABLED': True,
- 'CATEGORIES_ENABLED': True,
- 'OWNERS_ENABLED': True,
- 'KEYWORDS_ENABLED': True,
- 'H_KEYWORDS_ENABLED': True,
- 'T_KEYWORDS_ENABLED': True,
- 'DATE_ENABLED': True,
- 'REGION_ENABLED': True,
- 'EXTENT_ENABLED': True,
-
- Enabled Search Filters for filtering resources.
-
-SECURE_BROWSER_XSS_FILTER
--------------------------
-
- | Default: ``True``
- | Env: ``SECURE_BROWSER_XSS_FILTER``
-
- If True, the SecurityMiddleware sets the X-XSS-Protection: 1; mode=block header on all responses that do not already have it.
- This is ``__
-
-SECURE_CONTENT_TYPE_NOSNIFF
----------------------------
-
- | Default: ``True``
- | Env: ``SECURE_CONTENT_TYPE_NOSNIFF``
-
- If True, the SecurityMiddleware sets the X-Content-Type-Options: nosniff header on all responses that do not already have it.
- This is `Django settings: `__
-
-
-SECURE_HSTS_INCLUDE_SUBDOMAINS
-------------------------------
-
- | Default: ``True``
- | Env: ``SECURE_HSTS_INCLUDE_SUBDOMAINS``
-
- This is Django settings: https://docs.djangoproject.com/en/3.2/ref/settings/#secure-hsts-include-subdomains
-
-SECURE_HSTS_SECONDS
--------------------
-
- | Default: ``3600``
- | Env: ``SECURE_HSTS_SECONDS``
-
- This is `Django settings: `__
- If set to a non-zero integer value, the SecurityMiddleware sets the HTTP Strict Transport Security header on all responses that do not already have it.
-
-SECURE_SSL_REDIRECT
--------------------
-
- If True, the SecurityMiddleware redirects all non-HTTPS requests to HTTPS (except for those URLs matching a regular expression listed in SECURE_REDIRECT_EXEMPT).
- This is `Django settings: `__
-
-SERVICES_TYPE_MODULES
----------------------
-
-It's possible to define multiple Service Types Modules for custom service type with it's own Handler.
-
-The variable should be declared in this way in `settings.py`:
-
-`SERVICES_TYPE_MODULES = [ 'path.to.module1','path.to.module2', ... ]`
-
-Default service types are already included
-
-Inside each module in the list we need to define a variable:
-
-`services_type = {
- "": {
- "OWS": True/False,
- "handler": "",
- "label": "