<!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&nbsp;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>&nbsp;</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>&nbsp;</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>&nbsp;</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.&nbsp; 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>&gt;Hi,<BR>&gt;<BR>&gt;I might 
have missed something, but I keep looking at it and can't<BR>&gt;understand why 
the following keeps throwing an 'invalid geometry' error 
:(<BR>&gt;<BR>&gt;Here's the 
table:<BR>&gt;<BR>&gt;------------------------<BR>&gt;CREATE TABLE 
asistentes<BR>&gt;(<BR>&gt;&nbsp; gid int8 NOT NULL,<BR>&gt;&nbsp; nombre 
varchar(150),<BR>&gt;&nbsp; longitud float8,<BR>&gt;&nbsp; latitud 
float8,<BR>&gt;&nbsp; the_geom geometry,<BR>&gt;&nbsp; geometria 
geometry,<BR>&gt;&nbsp; CONSTRAINT asistentes_pkey PRIMARY KEY 
(gid),<BR>&gt;&nbsp; CONSTRAINT enforce_dims_geometria CHECK (ndims(geometria) = 
2),<BR>&gt;&nbsp; CONSTRAINT enforce_geotype_geometria CHECK 
(geometrytype(geometria) =<BR>&gt;'POINT'::text OR geometria IS 
NULL),<BR>&gt;&nbsp; CONSTRAINT enforce_srid_geometria CHECK (srid(geometria) = 
4326)<BR>&gt;)<BR>&gt;WITHOUT OIDS;<BR>&gt;ALTER TABLE asistentes OWNER TO 
postgres;<BR>&gt;------------------------<BR>&gt;<BR>&gt;The table is already 
populated and then I try updating one of the<BR>&gt;geometries 
with:<BR>&gt;<BR>&gt;------------------------<BR>&gt;UPDATE asistentes SET 
geometria=GeometryFromText('POINT(1,1)', 4326) 
WHERE<BR>&gt;gid=3;<BR>&gt;------------------------<BR>&gt;<BR>&gt;And I get the 
following Explain comment?<BR>&gt;<BR>&gt;------------------------<BR>&gt;La 
consulta insertó una fila con OID 0.<BR>&gt;<BR>&gt;ERROR:&nbsp; parse error - 
invalid geometry<BR>&gt;------------------------<BR>&gt;<BR>&gt;The spanish line 
says something like 'the query added one row with OID 0'.<BR>&gt;If anyone could 
shed some light on this I'd very much appreciate it 
:)<BR>&gt;<BR>&gt;Marc<BR>&gt;<BR>&gt;_______________________________________________<BR>&gt;postgis-users 
mailing 
list<BR>&gt;postgis-users@postgis.refractions.net<BR>&gt;http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></P><BR><BR></BODY></HTML>