<!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.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
color=#0000ff size=2>When you do a makepoint alone it returns a geometry with no
SRID (or ather SRID = -1). Assuming your x and y points are in srid 23029
then you should do instead</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2>update montouto2000 set the_geom=setsrid(MakePoint(x,y),
23029)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2>Now if your x y are in long lat, you will need to do something
like</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007><FONT face=Arial size=2>update
montouto2000 set the_geom=transform(setsrid(MakePoint(x,y), 4326),
23029)</FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007>Yes the dimension is number of
coordinates. So if you had a z coordinate for your point, it would be
3.</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007>Hope that
helps,</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007>Regina</SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2><SPAN class=577272012-04062007></SPAN></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=577272012-04062007><FONT face=Arial
size=2></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>Gustavo Ces<BR><B>Sent:</B> Monday, June 04, 2007 6:42 AM<BR><B>To:</B>
PostGIS Users Discussion<BR><B>Subject:</B> [postgis-users] Problems with
MakePoint<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> iīm trying to makepoints from
coordinate data ( x and y column) in one table( montouto2000). This is what i
do..</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>SELECT AddGeometryColumn('public', 'montouto2000',
'the_geom', 23029, 'POINT', 2)<BR>update montouto2000 set
the_geom=MakePoint(x,y)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>and Postgis says...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>ERROR: new row for relation "montouto2000" violates
check constraint "enforce_srid_the_geom"<BR>Estado SQL:23514</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Iīve got two questions:</FONT></DIV>
<DIV><FONT face=Arial size=2>1. What is the column dimension? i try to set it as
0 (poinst are no dimension geometries) but it says thereīs a problem
with the dim constraint, so i supose dimesion=number of coordinates? I donīt
know, please, help.</FONT></DIV>
<DIV><FONT face=Arial size=2>2. What happens with SRID? why does PostGis
Scream?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Gus</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>