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")

Geometry field types#

Geometry#

class trytond_gis.fields.Geometry([string[, dimension[, \**options]]])#

The base class of all other geometry field types defined here.

Geometry.dimension#

The number of dimension of the geometry.

Point#

class trytond_gis.fields.Point(\**options)#

A subclass of Geometry used to store a point.

LineString#

class trytond_gis.fields.LineString(\**options)#

A subclass of Geometry used to store a linestring.

Polygon#

class trytond_gis.fields.Polygon(\**options)#

A subclass of Geometry used to store a polygon.

MultiPoint#

class trytond_gis.fields.MultiPoint(\**options)#

A subclass of Geometry used to store a collection of points.

MultiLineString#

class trytond_gis.fields.MultiLineString(\**options)#

A subclass of Geometry used to store a collection of linestrings.

MultiPolygon#

class trytond_gis.fields.MultiPolygon(\**options)#

A subclass of Geometry used to store a collection of polygon.

GeometryCollection#

class trytond_gis.fields.GeometryCollection(\**options)#

A subclass of Geometry used to store a collection of any geometry.