def getexif_location(directory,fn):
lat=None<EOL>lon=None<EOL>sign_lat=+<NUM_LIT:1.0><EOL>sign_lon=+<NUM_LIT:1.0><EOL>exif_tags=exifread.process_file(open(os.path.join(directory,fn),'<STR_LIT:rb>'))<EOL>try:<EOL><INDENT>d,m,s=exif_tags['<STR_LIT>'].values<EOL>if exif_tags['<STR_LIT>'].values=='<STR_LIT>':<EOL><INDENT>sign_lon=-<NUM_LIT:1.0><EOL><DEDENT>lon=float(d.num) +float(m.num)/<NUM_LIT> +float(s.num/float(s.den))/<NUM_LIT><EOL>lon=lon*sign_lon<EOL>d,m,s=exif_tags['<STR_LIT>'].values<EOL>if exif_tags['<STR_LIT>'].values=='<STR_LIT:S>':<EOL><INDENT>sign_lat=-<NUM_LIT:1.0><EOL><DEDENT>lat=float(d.num)+float(m.num)/<NUM_LIT>+float(s.num/float(s.den))/<NUM_LIT><EOL>lat=lat*sign_lat<EOL><DEDENT>except:<EOL><INDENT>logger.debug("<STR_LIT>"%(fn))<EOL><DEDENT>return lat,lon<EOL>
directory - Dir where file is located
fn - filename to check for EXIF GPS

Returns touple of lat,lon if EXIF
eg. (34.035460,-118.227885)
files contains GPS info, otherwise returns
None,None