Hi,<div>I'm have problems to transform my spatial data to UTM. First, this instruction works OK:</div><div><br></div><div><i>SELECT ST_Transform(ST_GeomFromText('POINT(0.0 20)',4326),22171) from mypoints</i></div>
<div><i><br></i></div><div>No matter if such a sentence has no meaning on what I tryin to do.  But when I did the same with my own points:</div><div><br></div><div>SELECT ST_Transform(mypoints.the_geom,22171) from mypoints</div>
<div><br></div><div><i><span class="Apple-style-span" style="font-style: normal;">I get the following error:</span></i></div><div><i><span class="Apple-style-span" style="font-style: normal;"></span>ERROR: Input geometry has unknown (-1) SRID</i></div>
<div><i>SQL state: XX000</i></div><div><br></div><div>Ok, when I insert my points in my spatial enabled database I used:</div><div><br></div><div>INSERT INTO mydistance ( the_geom, the_name ) VALUES ( ST_GeomFromText('POINT(-58.0 0.0)'), 'Punto 1-1');</div>
<div><br></div><div>without no spatial reference system explicit so I guess the SRID is set to "unknown" i.e. -1.  Then naively I created a new column named srid for my table and put the right value of SRID for all my data which is 4326 (WGS84, sexagesimal degrees lat lon) in that column but still I get the same error. After that I created a constraint between this new srid column and the srid column from the spatial_ref_sys table but nothing happened, the error is still there.</div>
<div>It's important to me to solve this issue because all my spatial data was loaded from shapefiles without SRID awareness so they don't have any SRID column. I don't want to reload data changing this so I need a method to alter the tables in such a way to add this new srid column to them that is well related to the spatial context.</div>
<div>Thanks and regards,</div><div>Oscar</div>