Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create new table with Geometry, "Error type modeified for geometry not allowed" #50

Closed
talltom opened this issue May 13, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@talltom
Copy link

commented May 13, 2013

I have to say I'm impressed with GeoAlchemy2. Unfortunately, when I try and create a table with a geometry column I get the following error:

"sqlalchemy.exc.ProgrammingError: (ProgrammingError) type modifier is not allowed for type "geometry"
LINE 4: the_geom geometry(GEOMETRY,-1)"

Any ideas how I can fix this?

I'm using PostGIS 1.5 (which I guess might be the problem?),PostgreSQL 9.1 and GeoAlchemy2 0.2

Thanks.

@elemoine

This comment has been minimized.

Copy link
Member

commented May 13, 2013

You can use the GeoAlchemy google group for questions: https://groups.google.com/forum/?fromgroups#!forum/geoalchemy.

With PostGIS 1.5 you need to set management to True in your Geometry. See https://geoalchemy-2.readthedocs.org/en/0.2/types.html#geoalchemy2.types._GISType and https://github.com/geoalchemy/geoalchemy2/blob/master/geoalchemy2/tests/test_functional.py#L31.

If that still does not work, please show what your model class looks like.

@talltom

This comment has been minimized.

Copy link
Author

commented May 14, 2013

That did it thanks, works like a charm now! Will make sure I post to the group in future. Cheers. T

@talltom talltom closed this May 14, 2013

amercader added a commit to ckan/ckanext-spatial that referenced this issue Apr 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.