On Wednesday, September 5, 2012, Christian Ledermann wrote:
First of all thanks,
I tried to solve a specific problem with geoalchemy and ran into some problems,
with geoalchemy2 these have all disappeared. :)
I work with posgres 8.4, postgis 1.5, python 2.7, inside the pyramid
framework.
some observations (the SQL code was copied out of pgadmin):
For me it is very important that i can just define a column as
Geometry/Geography,
without the constraint to a specific Feature Type. a) because i have to import
lots of data from shapefiles which can consist of Polygons + MultiPolygons or
Lines + MultiLines, so being restricted to a specific feature type would be
inconvenient for me. In the future there will also be an import form KML which
can be a mix of all Types.
with geoalchemy i could define a column:
Column(name, Geometry(dim))
Try `Column(name, Geometry)` or `Column(name, Geometry(dimension=dim))`. Since a few commits, the first argument to Geometry is geometry_type, which defaults to "GEOMETRY". Does that fix the issue for you? (I'll update the docs to make this clearer.)
--
Eric