original_docstring: Extracts and returns GPS in degrees from exif_tags
docstring: Extracts and returns GPS in degrees from exif_tags
docstring_tokens: Extracts and returns GPS in degrees from exif_tags
code: def extract_gps_exif(exif_tags):
      """Extracts and returns GPS in degrees from exif_tags"""
      # Invalid values if tags do not exist
      gps_lat_out = 91
      gps_lon_out = 181
  
      if 'GPS GPSLatitude' in exif_tags:
          gps_lat = exif_tags['GPS GPSLatitude'].values
          gps_lat_ref = exif_tags['GPS GPSLatitudeRef'].values
          gps_lon = exif_tags['GPS GPSLongitude'].values
          gps_lon_ref = exif_tags['GPS GPSLongitudeRef'].values
  
          gps_lat_out = gps_lat[0].num + gps_lat[1].num / 60.0 + gps_lat[2].num / 3600.0
          if gps_lat_ref == 'S':
              gps_lat_out = -gps_lat_out
  
          gps_lon_out = gps_lon[0].num + gps_lon[1].num / 60.0 + gps_lon[2].num / 3600.0
          if gps_lon_ref == 'W':
              gps_lon_out = -gps_lon_out
  
      return gps_lat_out, gps_lon_out
code_tokens: def extract_gps_exif ( exif_tags ) : gps_lat_out = 91 gps_lon_out = 181 if 'GPS GPSLatitude' in exif_tags : gps_lat = exif_tags [ 'GPS GPSLatitude' ] . values gps_lat_ref = exif_tags [ 'GPS GPSLatitudeRef' ] . values gps_lon = exif_tags [ 'GPS GPSLongitude' ] . values gps_lon_ref = exif_tags [ 'GPS GPSLongitudeRef' ] . values gps_lat_out = gps_lat [ 0 ] . num + gps_lat [ 1 ] . num / 60.0 + gps_lat [ 2 ] . num / 3600.0 if gps_lat_ref == 'S' : gps_lat_out = - gps_lat_out gps_lon_out = gps_lon [ 0 ] . num + gps_lon [ 1 ] . num / 60.0 + gps_lon [ 2 ] . num / 3600.0 if gps_lon_ref == 'W' : gps_lon_out = - gps_lon_out return gps_lat_out , gps_lon_out
short_docstring: Extracts and returns GPS in degrees from exif_tags
short_docstring_tokens: Extracts and returns GPS in degrees from exif_tags
comment: """Extracts and returns GPS in degrees from exif_tags"""$SEP$# Invalid values if tags do not exist
  