function latlon  = geoloc( filename )
% Extract GPS info from image (if info exists)


fprintf('%s  \t',filename);
h = imfinfo(filename);
fprintf('%d x %d \n',h.Width,h.Height);
if isfield(h,'Make')
    fprintf('%s ',h.Make);
end
if isfield(h,'Model')
    fprintf('%s \n',h.Model);
end

if isfield(h,'GPSInfo')
    %      fprintf('%g:%g:%g %s\n',h.GPSInfo.GPSLatitude,h.GPSInfo.GPSLatitudeRef);
    %      fprintf('%g:%g:%g %s\n',h.GPSInfo.GPSLongitude,h.GPSInfo.GPSLongitudeRef);
    lat = h.GPSInfo.GPSLatitude;
    lat = lat(1) + (lat(2) + lat(3)/60)/60;
    lon = h.GPSInfo.GPSLongitude;
    lon = lon(1) + (lon(2) + lon(3)/60)/60;
    if h.GPSInfo.GPSLatitudeRef == 'S'
        lat = -lat;
    end
    if h.GPSInfo.GPSLongitudeRef == 'W'
        lon = -lon;
    end
    fprintf('GPS %.10g, %.10g\n',lat,lon);
    latlon = [lat lon];
    fprintf('GPS Altitude %g meters\n',h.GPSInfo.GPSAltitude);
else
    latlon = 'No GPSInfo';
end
fprintf('\n');

end
IMG_20141019_161626.jpg  	2448 x 3264 
LGE Nexus 4 
GPS -16.52505111, 145.4642792
GPS Altitude 55.099 meters


ans =

  -16.5251  145.4643