[postgis-users] Newbie problems

Jean David TECHER davidtecher at yahoo.fr
Thu May 19 06:22:47 PDT 2005


Sandro is righ for the sirdt....To my point of view U have follow example 

 
Example1: SELECT AddGeometryColumn('public', 'roads_geom', 'geom', 423, 'LINESTRING', 2)

Example2: SELECT AddGeometryColumn( 'roads_geom', 'geom', 423, 'LINESTRING', 2)

from http://postgis.refractions.net/docs/ch04.html#id3212013

here sird=-1 and not 423

use SELECT AddGeometryColumn('public', 'roads_geom', 'geom', -1, 'LINESTRING', 2) instead

---------------------------------------------------------------
TECHER Jean David
01MAP
e-mail: david at 01map.net
Tél: 04 67 45 60 27
Entreprise: http://www.01map.net
Perso: http://techer.pascal.free.fr/postgis/
---------------------------------------------------------------
  ----- Original Message ----- 
  From: daniel khan 
  To: postgis-users at postgis.refractions.net 
  Sent: Thursday, May 19, 2005 3:09 PM
  Subject: [postgis-users] Newbie problems


  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050519/49e0e39f/attachment.html>


More information about the postgis-users mailing list