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")
-
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.
-
class trytond_gis.fields.Point(\**options)
A subclass of Geometry used to store a point.
-
class trytond_gis.fields.LineString(\**options)
A subclass of Geometry used to store a linestring.
-
class trytond_gis.fields.Polygon(\**options)
A subclass of Geometry used to store a polygon.
-
class trytond_gis.fields.MultiPoint(\**options)
A subclass of Geometry used to store a collection of points.
-
class trytond_gis.fields.MultiLineString(\**options)
A subclass of Geometry used to store a collection of linestrings.
-
class trytond_gis.fields.MultiPolygon(\**options)
A subclass of Geometry used to store a collection of polygon.
-
class trytond_gis.fields.GeometryCollection(\**options)
A subclass of Geometry used to store a collection of any geometry.