<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div><span>Thank you Sandro,</span></div><div><span><br></span></div><div><span>The way you suggested works fine. </span></div><div><span><br></span></div><div><span>Though, I wonder what I cannot see. In the geometry_columns table, when I check the geometry's SRID, it is coded as 101. And this, I give to the "GeometryFromText" function. The only thing possible is, there's another coded srid in the geometry; which doesnt match the SRID in geometry_columns table. Any other suggestions?</span></div><div><span><br></span></div><div><span>"enforce_srid_<Geometry_Column_Name>" is a restriction defined on the spatial table.  ("position" is the name of my column, sorry.)</span></div><div><span><br></span></div><div><span>Thanks again. </span></div><div><span><br></span></div><div><span><br></span></div><div><br></div><div
 style="font-size: 10pt; font-family: tahoma, 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Sandro Santilli <strk@keybit.net><br><b><span style="font-weight: bold;">To:</span></b> Asli Akarsakarya <asliakar@yahoo.com>; PostGIS Users Discussion <postgis-users@postgis.refractions.net><br><b><span style="font-weight: bold;">Sent:</span></b> Friday, November 11, 2011 8:24 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [postgis-users] Updating Geometry<br></font><br>
On Thu, Nov 10, 2011 at 01:55:57PM -0800, Asli Akarsakarya wrote:<br>> <br>> I am having trouble when attempting to update an existing geometry on a spatial table. The table stores 2D Point geometry, with the SRID 101. The update statement i am trying to use to update the geometry with the id 110 is as follows:<br>> <br>> UPDATE <Table_Name> SET <Geometry_Column_Name> = GeometryFromText('POINT(44 31)', 101) WHERE <id_Column>=110<br>> <br>> But I get an error that says the statement violates the "enforce_srid_position" restriction. Though the SRID's are the same.<br><br>Probably they aren't. Try:<br><br> UPDATE <Table_Name> SET <Geometry_Coumn_Name> = GeometryFromText(<br> 'POINT(44 31)', ST_Srid(<Geometry_Column_Name>)) WHERE <id_Column>=110;<br><br>Then check what "enforce_srid_position" is<br>(doesn't sound like the correct name) using:<br><br> \d <Table_Name><br><br>--strk;
 <br><br>  ()   Free GIS & Flash consultant/developer<br>  /\   http://strk.keybit.net/services.html<br><br><br></div></div></div></body></html>