Hi Christian,<div>Thanks to your guide finally I could do what I wanted to. </div><div>1- The query </div><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">SELECT * FROM geometry_columns; <br>
</blockquote>Returned no data showing my the_geom column was not registered in geometry_columns as you suspected.</div><div><br></div><div>2- I created a new geometry column:</div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div>SELECT AddGeometryColumn( 'mypoints', 'the_geom_4326', 4326, 'POINT', 2);</div></div></blockquote>that was Ok as I checked that it was registered in geometry_columns table<div><br><div>3-Load the data from the_geom column to the new one the_geom_4326</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>UPDATE mypoints SET the_geom_4326 = ST_SetSRID(the_geom,4326);</div></div></blockquote>4-Check all the data entered in the_geom_4326 are with the right SRID:<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><div>select st_srid(the_geom) from mypoints;</div></div></blockquote>which shown that everything is Ok.<div><br><div>5-Check that the points in the new column have the right data:</div><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
Select st_xmin(the_geom), st_ymin(the_geom) from mypoints<br></blockquote><br></div><div> 6-Drop the_geom column and rename the_geom_4326 to the_geom</div><div>6-Calculate distances in meters. An example<div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
SELECT ST_Distance(ST_Transform(the_geom,22171), ST_Transform(ST_GeomFromText('POINT(-58.0 0.0)', 4326),22171)) from mypoints<br></blockquote>which returns the right results.</div><div><br></div><div>Thanks again Christian and everybody in the mail list for helping people to learn PostGIS.</div>
<div><br></div><div>Regards,</div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>Mario</div></blockquote><div><br></div><div><br><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
</blockquote><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
</blockquote><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"></blockquote><div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
</blockquote><div class="gmail_quote">On Thu, Jan 21, 2010 at 6:49 PM, Chris Hermansen <span dir="ltr"><<a href="mailto:chris.hermansen@timberline.ca">chris.hermansen@timberline.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
SELECT * FROM geometry_columns;<br>
<br>
if your table is in there, you will see a line that contains its name in f_table_name and its geometry column in f_geometry_column.  You don't need to guess.  Check its SRID there.<br>
<br>
You have some spatial queries that work ok with an SRID of -1.  Things like st_transform() don't work with an unknown SRID (which is what a -1 means).  AFAIK some of these operations need a row in geometry_columns.<br>

<br>
<br>
Oscar Zamudio wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
How can I test if it is not registered?. Nevertheless all the other spatial queries are working well (ST_distanc for example) so I guess it is registered. On the contrary ther will be no access to this kind of operations.<br>

<br></div><div class="im">
On Thu, Jan 21, 2010 at 5:24 PM, Chris Hermansen <<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a> <mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>>> wrote:<br>

<br>
    Maybe your column is not registered in geometry_columns?<br>
    Chris Hermansen        <a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a><br></div>
    <mailto:<a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a>><div class="im"><br>
    tel+1.604.714.2878 · fax+1.604.733.0631 · mob+1.778.840.4625<br>
    Timberline Natural Resource Group · <a href="http://www.timberline.ca" target="_blank">www.timberline.ca</a><br></div>
    <<a href="http://www.timberline.ca" target="_blank">http://www.timberline.ca</a>><div class="im"><br>
    401 · 958 West 8th Avenue  · Vancouver BC · Canada · V5Z 1E5<br>
<br>
<br>
    -----Original Message-----<br></div><div class="im">
    From: Oscar Zamudio <<a href="mailto:cmntlk@gmail.com" target="_blank">cmntlk@gmail.com</a> <mailto:<a href="mailto:cmntlk@gmail.com" target="_blank">cmntlk@gmail.com</a>>><br>
    Date: Thu, 21 Jan 2010 17:14:59<br>
    To: PostGIS Users Discussion<<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br></div><div class="im">
    <mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>>><br>
    Subject: Re: [postgis-users] Questions about using SRID not -1<br>
<br>
    _______________________________________________<br>
    postgis-users mailing list<br>
    <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br></div>
    <mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>><div class="im"><br>
    <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br>
    _______________________________________________<br>
    postgis-users mailing list<br>
    <a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br></div>
    <mailto:<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a>><div class="im"><br>
    <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br>
<br>
</div></blockquote>
<br>
<br>
-- <br>
Regards,<br>
<br>
Chris Hermansen · <a href="mailto:chris.hermansen@timberline.ca" target="_blank">chris.hermansen@timberline.ca</a> · skype:clhermansen<div class="im"><br>
tel+1.604.714.2878   ·  fax+1.604.733.0631   ·   mob+1.778.840.4625<br></div>
Timberline Natural Resource Group Ltd   ·  <a href="http://www.timberline.ca" target="_blank">http://www.timberline.ca</a><div><div></div><div class="h5"><br>
401  ·  958 West 8th Avenue  ·  Vancouver BC  ·  Canada  ·  V5Z 1E5<br>
<br>
</div></div></blockquote></div><br></div></div></div></div></div></div></div></div></div>