<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>I am just a newbie into PostGIS, but from the SQL code 
presented I see some puzzling questions (for me, of course):</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>1. Although two geometry fields exist in the table, I see 
constraints just for one of them (geometria);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>2. The SRID and other fields in the table refer to a 
geographical reference system (not projected);</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>3. Given the statement above, how could a Point with 
coordinates (1 1) be inserted??!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>4. Further, each coordinate should have a space 
separating the next coordinate in the tuple, not a comma.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>If PostGIS uses decimal degrees for geographic coordinates, 
then a typical Point insertion would be:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>POINT(2.82806 41.98500)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>which is longitude (positive is East) and latitude 
(positive is North).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>Regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=448044515-14112007><FONT face=Arial 
color=#0000ff size=2>Joao</FONT> </SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
postgis-users-bounces@postgis.refractions.net 
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of 
</B>Amrita p<BR><B>Sent:</B> Wednesday, November 14, 2007 9:51 AM<BR><B>To:</B> 
PostGIS Users Discussion<BR><B>Subject:</B> Re: [postgis-users] A simple 
GeomFromText<BR></FONT><BR></DIV>
<DIV></DIV>
<P>Because in ur table the constraint is 2 dimension.  U cant store point 
into ur table. To store point delete the constraint for two dim.<BR><BR><BR>On 
Thu, 01 Nov 2007 mcompte@sigte.udg.es wrote :<BR>>Hi,<BR>><BR>>I might 
have missed something, but I keep looking at it and can't<BR>>understand why 
the following keeps throwing an 'invalid geometry' error 
:(<BR>><BR>>Here's the 
table:<BR>><BR>>------------------------<BR>>CREATE TABLE 
asistentes<BR>>(<BR>>  gid int8 NOT NULL,<BR>>  nombre 
varchar(150),<BR>>  longitud float8,<BR>>  latitud 
float8,<BR>>  the_geom geometry,<BR>>  geometria 
geometry,<BR>>  CONSTRAINT asistentes_pkey PRIMARY KEY 
(gid),<BR>>  CONSTRAINT enforce_dims_geometria CHECK (ndims(geometria) = 
2),<BR>>  CONSTRAINT enforce_geotype_geometria CHECK 
(geometrytype(geometria) =<BR>>'POINT'::text OR geometria IS 
NULL),<BR>>  CONSTRAINT enforce_srid_geometria CHECK (srid(geometria) = 
4326)<BR>>)<BR>>WITHOUT OIDS;<BR>>ALTER TABLE asistentes OWNER TO 
postgres;<BR>>------------------------<BR>><BR>>The table is already 
populated and then I try updating one of the<BR>>geometries 
with:<BR>><BR>>------------------------<BR>>UPDATE asistentes SET 
geometria=GeometryFromText('POINT(1,1)', 4326) 
WHERE<BR>>gid=3;<BR>>------------------------<BR>><BR>>And I get the 
following Explain comment?<BR>><BR>>------------------------<BR>>La 
consulta insertó una fila con OID 0.<BR>><BR>>ERROR:  parse error - 
invalid geometry<BR>>------------------------<BR>><BR>>The spanish line 
says something like 'the query added one row with OID 0'.<BR>>If anyone could 
shed some light on this I'd very much appreciate it 
:)<BR>><BR>>Marc<BR>><BR>>_______________________________________________<BR>>postgis-users 
mailing 
list<BR>>postgis-users@postgis.refractions.net<BR>>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></P><BR><BR></BODY></HTML>