<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" color=#800000>I am 
trying to add a column to my table that lists the centroids the polygon 
described in the&nbsp;'the_geom' field.&nbsp; I use the following, which works 
(I think), but of which I have questions:</FONT></SPAN></DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000>SELECT AddGeometryColumn( '', 'shp_mcd', 'centroid', -1, 'POINT', 
2 );<BR>UPDATE shp_mcd SET centroid = centroid ( the_geom );</FONT></SPAN></DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" color=#800000>My 
question is about the final argument to AddGeometryColumn.&nbsp; Documentation 
states that centroid() returns a POINT.&nbsp; I figure that that implies that 
the last argument should then be a 0, not a 2.&nbsp; But if I use a 0 in the 
last field, the updated doesn't work -- it tells me that i violate a dimension 
constraint.&nbsp; Can someone explain why I need to have a 2 as the last 
argument and not a 0?&nbsp; It doesn't make sense to me.</FONT></SPAN></DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=090575918-21112006><FONT face="Courier New" 
color=#800000>Matt</FONT></SPAN></DIV></BODY></HTML>