Elements¶
-
class
geoalchemy2.elements.WKTElement(data, srid=- 1, extended=False)[source]¶ Bases:
geoalchemy2.elements._SpatialElementInstances of this class wrap a WKT or EWKT value.
Usage examples:
wkt_element_1 = WKTElement('POINT(5 45)') wkt_element_2 = WKTElement('POINT(5 45)', srid=4326) wkt_element_3 = WKTElement('SRID=4326;POINT(5 45)', extended=True)
-
property
desc¶ This element’s description string.
-
geom_from= 'ST_GeomFromText'¶
-
geom_from_extended_version= 'ST_GeomFromEWKT'¶
-
property
-
class
geoalchemy2.elements.WKBElement(data, srid=- 1, extended=False)[source]¶ Bases:
geoalchemy2.elements._SpatialElementInstances of this class wrap a WKB or EWKB value.
Geometry values read from the database are converted to instances of this type. In most cases you won’t need to create
WKBElementinstances yourself.If
extendedisTrueandsridis-1at construction time then the SRID will be read from the EWKB data.Note: you can create
WKBElementobjects from Shapely geometries using thegeoalchemy2.shape.from_shape()function.-
property
desc¶ This element’s description string.
-
geom_from= 'ST_GeomFromWKB'¶
-
geom_from_extended_version= 'ST_GeomFromEWKB'¶
-
property
-
class
geoalchemy2.elements.RasterElement(data)[source]¶ Bases:
geoalchemy2.elements._SpatialElementInstances of this class wrap a
rastervalue. Raster values read from the database are converted to instances of this type. In most cases you won’t need to createRasterElementinstances yourself.-
property
desc¶ This element’s description string.
-
property