[postgis-users] converting to lat long

Gheorghiu, Mihai mgheorghiu at chpmail.com
Tue Jul 12 06:17:38 PDT 2011


I would suggest that first you check your data has a consistent format, i.e. "zero" is represented as 0000, 12.3 degrees is represented as 1230 and 1.23 degrees is represented as 0123.
Otherwise you need to do a little preparation work...

HTH,

Michael

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of John Callahan
Sent: Tuesday, July 12, 2011 9:13 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] converting to lat long

Looks like you already have lat/long coordinates and don't need to use ST_Transform.  Make sure you know if the original values are in 'decimal degrees' or 'degrees minutes seconds'.  If in DD, just divide your values by 100 which should be easy in SQL.  If in DMS, then you need to parse the data first.  I'm not sure how to do that in SQL but sure it's possible.

- John


On Tue, Jul 12, 2011 at 8:58 AM, Yamini Singh <yaminijsingh at live.com<mailto:yaminijsingh at live.com>> 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<mailto:postgis-users at postgis.refractions.net>
http://postgis.refractions.net/mailman/listinfo/postgis-users



The information contained in this transmission is to be considered CONFIDENTIAL and PROPRIETARY to Consortium Health Plans, Inc. and intended for the use of the Individual or Entity named above.  If the reader of this message is not the Intended Recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is Strictly Prohibited.  If you have received this transmission in error, please notify us immediately by telephone at 410-772-2900 or return email to sender immediately.  Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110712/52f0a3b8/attachment.html>


More information about the postgis-users mailing list