[postgis-users] Newbie problems
strk at refractions.net
strk at refractions.net
Thu May 19 06:19:50 PDT 2005
Daniel, the constraint is added by the AddGeometryColumn
call. It is there to ensure the SRID specified in the geometry_columns
matches the one of each geometry. SRID information is embedded in
each geometry object.
You are specifying -1 for your new geom, while the table
expects find_srid('', 'roads_geom', 'geom').
--strk;
On Thu, May 19, 2005 at 03:09:08PM +0200, daniel khan wrote:
> Hello List,
>
> I am currently testing OpenGIS.
> I am also quite new to postgres as I only want to use it as GIS
> backend but I know how to use RDBMs in general.
>
> I installed PostGIS and created the neccessary tables for the metadata
> and I also was able to follow some of the examples at the beginning of
> the manual.
>
> But now I have a problem:
>
> INSERT INTO ROADS_GEOM (ID,GEOM,NAME ) VALUES
> (1,GeomFromText('LINESTRING(191232 243118,191108 243242)',-1),'Jeff
> Rd');
>
> gives
>
> ERROR: new row for relation "roads_geom" violates check constraint
> "enforce_srid_geom"
>
> I understand what this generally means but I don't understand it in
> GIS context.
> What am I doing wrong? I am trying to understand the whole thing so
> removing the constraint may help in this case but won't explain the
> problem to me..
>
> Thanks in advance
>
> --
> Daniel
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list