Tuesday, April 24, 2012

Re: problem with syncdb in geodjango tutorial

25.4.2012 7:59, kenneth gonsalves kirjoitti:
> hi,
>
> I am following the geodjango tutorial, and when doing syncdb, I get the
> following error:
>
> [lawgon@xlquest geodjango]$ python manage.py syncdb
> Creating tables ...
> Creating table world_worldborder
> Installing custom SQL ...
> Installing indexes ...
> Failed to install index for world.WorldBorder model:
> AddGeometryColumns() - invalid SRID
> CONTEXT: SQL statement "SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5)"
> PL/pgSQL function "addgeometrycolumn" line 5 at SQL statement
>
> am using postgis on Fedora 16 and django trunk
>

I've seen that error when you try to create new column in postgis
database with SRID that doesn't exists in postgis srid definitions.

You can check does SRID exist in database:

select * from spatial_ref_sys where srid=<srid number>;

I suppose you did provided some SRID when defining column in model...

--
Jani Tiainen

- Well planned is half done and a half done has been sufficient before...

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment