[Tutor] An interesting case... of east vs. west
John
washakie at gmail.com
Wed Jul 11 03:50:26 CEST 2007
I will work with this further, and report back once I find Alan's method...
but for now, this seems to work:
for i in range(0,20):
y=d[i][2].split('\xb0')
x=d[i][3].split('\xb0')
ydeg,ymin=int(y[0].rstrip()),float(y[1].strip('\' N'))
xdeg,xmin=int(x[0].rstrip()),float(x[1].rstrip("\' E").rstrip("\' W"))
if re.search("W",x[1]): xdeg=-1*xdeg
if re.search("S",y[1]): ydeg=-1*ydeg
declat=abs(ydeg)+ymin/60
declon=abs(xdeg)+xmin/60
if ydeg < 0: declat=declat*-1
if xdeg < 0: declon=declon*-1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070711/9413b161/attachment.htm
More information about the Tutor
mailing list