<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Not quite.<br><br>You need to reproject the lat long coords to 29101 before writing them to your table.<br><br>Your first SQL creating the column is fine, the second update needs changing.<br><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br>UPDATE tablename SET geom_col = st_transform(st_setsrid(makepoint(long_dd,lat_dd),4326),29101);</font><br><br>this:<br>creates a point from two numbers (makepoint)<br>sets this to lat/long (setsrid to 4326)<br>reprojects to 29101 (st_transform to 29101)<br>updates each gem_col with this value<br><br><br>Cheers,<br><br> Brent<br> <br>--- On <b>Sat, 7/16/11, Yamini Singh <i><yaminijsingh@live.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Yamini Singh <yaminijsingh@live.com><br>Subject: RE:
[postgis-users] converting to lat long<br>To: pcreso@pcreso.com<br>Date: Saturday, July 16, 2011, 5:39 AM<br><br><div id="yiv1213228309">
<style><!--
#yiv1213228309 .yiv1213228309hmmessage P
{
margin:0px;padding:0px;}
#yiv1213228309 .yiv1213228309hmmessage
{
font-size:10pt;font-family:Tahoma;}
--></style>
<div dir="ltr">
<div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2">Yes Bret, at-least on the same topic i can do that for novices ....</font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div style="font-family: Tahoma; font-size: 10pt;">Now i have 'geom' column with SRID 4326 generated from two columns 'lat_dd' and 'long_dd' which since i dont know how to convert individual column lat_dd and long_dd to SRID 29101 i use query to directly generate geometry.</div><div style="font-family: Tahoma; font-size: 10pt;">First i create geometry column using: </div><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2">SELECT addgeometrycolumn('tablename', 'geom_col', '29101', 'POINT', 2);</font></div><div><font
class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2">then i generate geometry directly using sql below (if i understand correctly that if the geometry col (i.e., </font><span class="yiv1213228309Apple-style-span" style="font-family: Tahoma; font-size: 10pt;">geom_col</span><span class="yiv1213228309Apple-style-span" style="font-family: Tahoma; font-size: 10pt;">) is set to SRID 29101 then even if i use lat_dd and long_dd i should get geometry which is as per the SRID 29101 and not 4326)</span></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2">UPDATE tablename SET geom_col = st_setsrid(makepoint(long_dd,lat_dd),29101);</font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font
class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2">hope this is correct.</font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2">Regards,</font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2">YJ</font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><div><font class="yiv1213228309Apple-style-span" face="Tahoma" size="2"><br></font></div><br><br><div style="font-family: Tahoma; font-size: 10pt;"><hr id="yiv1213228309stopSpelling">Date: Thu, 14 Jul 2011 23:54:48 -0700<br>From:
pcreso@pcreso.com<br>Subject: RE: [postgis-users] converting to lat long<br>To: yaminijsingh@live.com<br><br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><br>You are welcome :-)<br><br>Your turn to help other newcomers as they ask questions you can answer!<br><br>Cheers,<br><br>Brent<br><br><blockquote style="margin-left: 5px; padding-left: 5px;"><div id="yiv1213228309ecxyiv500251538"><div dir="ltr"><div><div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><blockquote style="margin-left: 5px; padding-left: 5px;"><div id="yiv1213228309ecxyiv500251538ecxyiv694735096"><div dir="ltr"><div><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><br><br><br><blockquote style="margin-left: 5px; padding-left: 5px;"><div id="yiv1213228309ecxyiv500251538ecxyiv694735096ecxyiv159434206"><div dir="ltr"><div></div>
</div>
</div></blockquote></td></tr></tbody></table></div> </div>
</div></blockquote></td></tr></tbody></table></div></div> </div>
</div></blockquote></td></tr></tbody></table></div> </div>
</div></blockquote></td></tr></table>