geoalchemy/geoalchemy — pull request #9 by kwirk (2011-12-18 16:26:00+00:00)
Title: PostGIS WKT internal

I've added a feature to set GeoAlchemy to use WKT internally with PostGIS. This allows use of _coords_, _geom_type_ and _geom_wkt_ without additional queries to the database.

The feature is enabled by adding the option _wkt_internal=True_ in the _GeometryColumn_ definition. e.g.

``` python
lake_geom = GeometryColumn(Geometry(2), comparator=PGComparator, wkt_internal=True)
```

When using non PostGIS dialect, during a query compile a warning is raised (_SAWarning_) and defaults back to WKB, so shouldn't break compatibility with other dialects.

I've changed the PostGIS tests so the the _Lake_ mapper uses _wkt_internal=True_, added a test for _geom_type_ and _geom_wkt_(as part of _test_wkt_).

I've also added a bit to the documentation.