details:   https://code.tryton.org/tryton/commit/7f9705046bda
branch:    default
user:      Hartmut Goebel <[email protected]>
date:      Tue Nov 18 00:35:27 2025 +0100
description:
        Document gis fields
diffstat:

 trytond-gis/doc/fields.rst |  86 ++++++++++++++++++++++++++++++++++++++++++++++
 trytond-gis/doc/index.rst  |  15 ++++++-
 2 files changed, 99 insertions(+), 2 deletions(-)

diffs (118 lines):

diff -r e1f10c0023f9 -r 7f9705046bda trytond-gis/doc/fields.rst
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/trytond-gis/doc/fields.rst        Tue Nov 18 00:35:27 2025 +0100
@@ -0,0 +1,86 @@
+.. _ref-models-gis_fields:
+.. module:: trytond_gis.fields
+
+======
+Fields
+======
+
+The Tryton GIS backend provides the Field types described below.
+They be used in a ModelSQL like this::
+
+  from trytond.model import ModelSQL
+  from trytond_gis.fields import Point
+
+
+  class Point(ModelSQL):
+      __name__ = 'test.gis.point'
+
+      point = Point("Point")
+
+.. contents::
+   :local:
+   :backlinks: entry
+   :depth: 2
+
+Geometry field types
+====================
+
+Geometry
+--------
+
+.. class:: Geometry([string[, dimension[, \**options]]])
+
+   The base class of all other geometry field types defined here.
+
+.. attribute:: Geometry.dimension
+
+   The number of dimension of the geometry.
+
+Point
+-----
+
+.. class:: Point(\**options)
+
+   A subclass of :class:`Geometry` used to store a point.
+
+LineString
+----------
+
+.. class:: LineString(\**options)
+
+   A subclass of :class:`Geometry` used to store a linestring.
+
+Polygon
+-------
+
+.. class:: Polygon(\**options)
+
+   A subclass of :class:`Geometry` used to store a polygon.
+
+MultiPoint
+-----------
+
+.. class:: MultiPoint(\**options)
+
+   A subclass of :class:`Geometry` used to store a collection of points.
+
+MultiLineString
+---------------
+
+.. class:: MultiLineString(\**options)
+
+   A subclass of :class:`Geometry` used to store a collection of linestrings.
+
+MultiPolygon
+------------
+
+.. class:: MultiPolygon(\**options)
+
+   A subclass of :class:`Geometry` used to store a collection of polygon.
+
+GeometryCollection
+------------------
+
+.. class:: GeometryCollection(\**options)
+
+   A subclass of :class:`Geometry` used to store a collection of any geometry.
diff -r e1f10c0023f9 -r 7f9705046bda trytond-gis/doc/index.rst
--- a/trytond-gis/doc/index.rst Tue Nov 04 10:25:02 2025 +0100
+++ b/trytond-gis/doc/index.rst Tue Nov 18 00:35:27 2025 +0100
@@ -1,11 +1,22 @@
+==================
 Tryton GIS backend
 ==================
 
-It adds GIS__ support to Tryton.
+Tryton GIS (`Geographic Information System
+<https://en.wikipedia.org/wiki/Geographic_information_system>`_) adds support
+for geospatial data to Tryton.
+It adds new *Field types* like *Point*, *LineString* and *MultiPolygon*.
 
-__ https://en.wikipedia.org/wiki/Geographic_information_system
+The intended use is to write GIS data directly into the database with an
+`existing GIS software <https://en.wikipedia.org/wiki/PostGIS#Users>`_.
+
+For using these Tryton GIS, the `PostGIS <https://postgis.net/>`_ extension
+must be installed on the database and the database ``uri`` in the
+``[database]`` sectionn of the configuration must start with: ``postgis://``
+instead of ``postgresql://``.
 
 .. toctree::
    :maxdepth: 2
 
+   fields
    releases

Reply via email to