[postgis-users] converting to lat long

Ben Madin lists at remoteinformation.com.au
Tue Jul 12 07:22:54 PDT 2011


FWIW - PostGIS uses long lat format...

If you are confident about the data consistency, this should be a pretty straightforward task - if you are not sure, it might still be quite simple if you are prepared to look into the mystical world of regular expressions. PostgreSQL offers support for these on the previously recommended string expressions page, but you will also need to look at the pattern matching page.

If you haven't ever looked at regular expressions, there are a number of very good resources available on the web. They are annoyingly useful, so worth investing some time in learning about them.

cheers

Ben


On 12/07/2011, at 8:58 PM, Yamini Singh wrote:

> Hi All,
> 
> I have a column 'geocode' in a table which has attributes like 2329/4727 now I would like to convert these attributes in another column to 'lat' and 'long'. For example, 'Lat' column will have attribute '23.29' and 'long' column will have attribute  '47.27'.
> Is there a way through which this can be converted automatically by a query or so.
> 
> Looking fwd..
>  
> Thanks
> YJ
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110712/165d5103/attachment.html>


More information about the postgis-users mailing list