The SQLAlchemy Geometry type.
Use a Geometry instance when defining a geometry column in an sqlalchemy.schema.Table object of the model.
Example:
wifi_table = Table('wifi', metadata,
Column('gid', Integer, primary_key=True),
Column('the_geom', Geometry(4326))
)
Class to be mixed in mapped classes.
When used the mapped class exposes
When used the mapped object exposes
Example:
lines_table = Table(
"lines", metadata,
Column('the_geom', Geometry(4326)),
autoload=True, autoload_with=engine)
class Line(GeometryTableMixIn):
# for GeometryTableMixIn to do its job the __table__ property
# must be set here
__table__ = lines_table
mapper(Line, lines_table)