<div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,255)">Hi Brent Wood,</div><div class="gmail_default" style="color:rgb(0,0,255)"><br></div><div class="gmail_default" style="color:rgb(0,0,255)">Many thanks, it works.</div><div class="gmail_default" style><font face="verdana, sans-serif" color="#000000">UPDATE public.town SET geom = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326);</font><br></div><div class="gmail_default" style><font color="#0000ff"><br></font></div><div class="gmail_default" style><font color="#0000ff">I am using postGIS to store the data and using GeoServer for publishing the data to maps.</font></div><div class="gmail_default" style><font color="#0000ff"><br></font></div><div class="gmail_default" style><font color="#0000ff">I'm thinking to use the GeoExplorer (from OpenGeo Suite) for digitizing and collecting the location information.</font></div><div class="gmail_default" style><font color="#0000ff">When using GeoExplorer, the geometry information is automatically stored to the </font><font color="#000000" face="verdana, sans-serif"><b>geom</b></font><font color="#0000ff"> field of the table and the use have to fill all the attribute again.</font></div><div class="gmail_default" style><font color="#0000ff"><br></font></div><div class="gmail_default" style><font color="#0000ff">But I already have the full list in a postGIS table.</font></div><div class="gmail_default" style><font color="#0000ff">How can I make my application in such a way that user just need to select from the list and digitizing the location only. No need to enter the attribute again.</font></div><div class="gmail_default" style><font color="#0000ff"><br></font></div><div class="gmail_default" style><font color="#0000ff">Many thanks for any idea.</font></div><div class="gmail_default" style><font color="#0000ff"><br></font></div><div class="gmail_default" style><font color="#0000ff">Best regards</font></div><div class="gmail_default" style><font color="#0000ff"><br></font></div><div class="gmail_default" style="color:rgb(0,0,255)"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 3, 2015 at 10:50 AM, Brent Wood <span dir="ltr"><<a href="mailto:pcreso@pcreso.com" target="_blank">pcreso@pcreso.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"><div dir="ltr"><span>Hi.</span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>Try something like:<br></span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>update <table> set <geometry column> = ST_SetSRID(ST_MakePoint(Longitude, Latitude),4326);</span></div><div><br></div><div dir="ltr">Essentially create a point geometry from your numeric values, with the ST_MakePoint() function, the inform Postgis it is a standard lat/long CS (EPSG:4326 - which you should have specified when you created the column), & update the table with these values for each row. Make sure you use your table & column names....</div><div dir="ltr"><br></div><div dir="ltr">What mapping/GIS program are you using?<br></div><div dir="ltr"><br></div><div dir="ltr">Cheers,</div><div dir="ltr"><br></div><div dir="ltr"> Brent Wood<br></div><div><br> </div><div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:16px"> <div dir="ltr"> <hr size="1"> <font face="Arial"> <b><span style="font-weight:bold">From:</span></b> KhunSanAung <<a href="mailto:khunsanaung.gis@gmail.com" target="_blank">khunsanaung.gis@gmail.com</a>><br> <b><span style="font-weight:bold">To:</span></b> <a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a> <br> <b><span style="font-weight:bold">Sent:</span></b> Tuesday, February 3, 2015 5:11 PM<br> <b><span style="font-weight:bold">Subject:</span></b> [postgis-users] Convert from Lat/Long point to postGIS geometry<br> </font> </div> <div><div><div class="h5"><br><div><div dir="ltr"><div style="color:rgb(0,0,255)">Hi All,</div><div style="color:rgb(0,0,255)"><br></div><div style="color:rgb(0,0,255)">I have one table (Town info) in postgres without Geometry field.</div><div style="color:rgb(0,0,255)">I have Latitude and Longitude information for those points data separately (collecting & filling).<br></div><div style="color:rgb(0,0,255)"><br></div><div style="color:rgb(0,0,255)">I created the postGIS extension and add the Geometry field in the above postgres table.</div><div style="color:rgb(0,0,255)">Now, I'd like to add the location information into the postGIS geometry field so that I can immediately view those points on the map. </div><div style="color:rgb(0,0,255)"><br></div><div style="color:rgb(0,0,255)">How can I convert the Latitude/Longitude value into postGIS geometry value?</div><div style="color:rgb(0,0,255)"><br></div><div style="color:rgb(0,0,255)">Thank you very much in advance.</div><div style="color:rgb(0,0,255)"><br></div>-- <br><div><div dir="ltr"><span style="color:rgb(0,0,153)">Have a nice day!</span><br>--<br><div style="line-height:115%"><b><span style="font-size:9pt;line-height:115%;color:rgb(127,127,127)" lang="EN-GB">Mr. Khun San Aung</span></b></div><u><span style="font-size:9pt;line-height:115%;color:blue" lang="EN-GB"><a rel="nofollow" href="http://geoportal.icimod.org/" target="_blank"></a></span></u><u><span style="font-size:9pt;line-height:115%;color:rgb(127,127,127)" lang="EN-GB"></span></u></div></div>
</div></div><br></div></div>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br><br></div> </div> </div> </div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span style="color:rgb(0,0,153)">Have a nice day!</span><br>--<br><p style="line-height:115%"><b><span style="font-size:9.0pt;line-height:115%;color:#7f7f7f" lang="EN-GB">Mr. Khun San Aung</span></b></p><u><span style="font-size:9.0pt;line-height:115%;color:blue" lang="EN-GB"><a href="http://geoportal.icimod.org/" target="_blank"></a></span></u><u><span style="font-size:9.0pt;line-height:115%;color:#7f7f7f" lang="EN-GB"></span></u></div></div>
</div>