Skip to content

Commit

Permalink
Update documentation for the revision 6742877
Browse files Browse the repository at this point in the history
  • Loading branch information
c2c-bot-gis-ci committed Nov 8, 2024
1 parent fd444c0 commit db6e0d5
Show file tree
Hide file tree
Showing 164 changed files with 34,304 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 2.9/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 097872d0b14f680ab4b7c1da8c6be054
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added 2.9/_images/database.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions 2.9/_sources/administrator/administrate.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _administrator_administrate:

Administrate a c2cgeoportal application
=======================================

The administration interface is located at ``https://<server>/<project>/admin``.

Authentication for the administration interface is done through the main application interface. Role
``role_admin`` is required.
142 changes: 142 additions & 0 deletions 2.9/_sources/administrator/editing.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
.. _administrator_editing:

Editing
=======

This section explains how to configure the edit function in c2cgeoportal.

Just like most administrative tasks, setting up editing in a c2cgeoportal application involves intervening
in the database, through the c2cgeoportal administration interface.

Requirements
------------

To be editable, a layer should satisfy the following requirements:

1. It should be accessible with WMS, and correctly configured in the
mapfile. See :ref:`administrator_mapfile`.
2. Its data should be in a PostGIS table, which should be in the
application database. The PostGIS table can be in a separate
schema though, which is in fact recommended.
3. The PostGIS table should include a primary key with a sequence
associated. The name of the primary key attribute must be ``id``. Example::

db=# \d table;
Table "public.table"
Column | Type | Modifiers
-------------+-------------+----------------------------------------------------------
id | integer | not null default nextval('public.table_id_seq'::regclass)

4. The PostGIS table should include one geometry column only. You
will get errors if the table has multiple geometry columns.

5. The following geometry types are fully supported: ``POINT``, ``LINESTRING``, ``POLYGON``.
The following geometry types are partially supported:
``MULTIPOINT``, ``MULTILINESTRING``, ``MULTIPOLYGON``.

6. If the PostGIS table has a many-to-one relationship to another table,
(typically a dictionary table) there are additional requirements:

* The name of the foreign key column should end with ``_id`` (e.g.
``type_id``). This is not strictly required, but recommended.
* The relationship's target table should have at least two columns, a
primary key column and a text column. By default the used text column is the column named ``name``.
The default order column is the text column.
* | The column ``name`` of the relationship's target table MUST NOT have empty values.
| Hint: set a `NOT NULL` constraint on this column.
| This MAY also apply to other columns as well if they are used in the relation.
* | Another text column and a order column can be specified by the ``editingEnumerations`` layer metadata.
| Example:
.. code:: json
{
"type_id": {
"value": "value_column",
"order_by": "order_column"
}
}
7. The supported column types are:

* ``integer``
* ``numeric``
* ``character varying``
* ``text``
* ``boolean``
* ``date``
* ``time without time zone``
* ``timestamp without time zone``

Note that the following types will not working correctly with the timezone:

* ``time with time zone``
* ``timestamp with time zone``


.. _administrator_editing_editable:

Adding or making layers editable
--------------------------------

The application's layers are defined in the ``layer`` table, which is managed
by selecting the *Layers* item in the admin interface's menu.

For a *layer* to be editable its ``geoTable`` field should be set. This field
is the name of the PostGIS table containing the layer's geographic data. It is
a string of the form ``[<schemaname>.]<tablename>``. If ``schemaname`` is
omitted, the table is assumed to be in the ``public`` schema. The label
corresponding to this field is *Related Postgres table* in the admin interface.

.. warning::

Only layers embedded in a layergroup are detected as editable.

.. warning::

It is recommended to limit the editing to 30 editable layers per user.


Configuring security
--------------------

Editing the features of a layer implies to write changes in the database. To make
sure that only authorized users may edit a feature, editable layers (including
public layers) must be linked to a restriction area, used itself to specify the
roles of authorized users.

The restriction area should have its ``readwrite`` field set to ``true`` in the
administration interface.

Binding restriction areas and layers together can be done from the ``Layer`` objects in the admin interface.
Likewise for binding from the ``Restriction areas``.

Edit views
----------

To be able to edit PostgreSQL views a primary key must be manually configured.
Add a layer metadata ``geotablePrimaryKey`` with value the name of the column to use as primary key.
That column must be of type ``Integer``.

Example: ``geotablePrimaryKey``: ``id``

Enable snapping
---------------

To be able to snap while editing, the ``snappingConfig`` must be set on the layer metadata.
The value is a ``json`` object containing the following optional properties:

* activated (boolean): whether snapping is activated by default (default: true);
* edge (boolean): whether to allow snapping on edges or not;
* vertex (boolean): whether to allow snapping on vertices or not;
* tolerance (number): the pixel tolerance.

Managing attributes
-------------------

To exclude some attributes from the editing form, list them as a comma-separated string
(with no blank spaces) in the ``Exclude properties`` field of the WMS/WMTS layer forms
in the admin interface.

To make some attributes readonly, add a ``readonlyAttributes`` metadata in the same form,
also as a comma-separated list of attributes.
26 changes: 26 additions & 0 deletions 2.9/_sources/administrator/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _administrator_guide:

===================
Administrator Guide
===================

This chapter describes how to administrate a c2cgeoportal
application.

The application administrator configures and administrates the application
through the database. The administrator does not deal with the files of the
application (the integrator is the one responsible for these files), except for
the map server files. Adding layers to the application indeed requires
inserting information in the database, as well as adding layers in the map
server.

Content:

.. toctree::
:maxdepth: 1

administrate
editing
mapfile
tinyows
wmstime
Loading

0 comments on commit db6e0d5

Please sign in to comment.