getElevations function queries Google Maps API webservice for ground elevations. See https://developers.google.com/maps/documentation/elevation/ for details.
Jaroslaw Tuszynski (2021). getElevations(latitude, longitude, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/50704-getelevations-latitude-longitude-varargin), MATLAB Central File Exchange. Retrieved .
Update to my comment: You know have to activate billing on Google API
Worked great, however, now it is throwing an error. I believe google API updated and now this function no longer works.
Easy, exactly what I was looking for.
Some times i have the message "Google Maps API requestor has exceeded quota" & sometimes i haven't ... Someon can help me ? I read the quotas of free account Google API but i think i respect this.
OK, the error is just a matter of the API response. Simple fix (AA is lat and lon):
e = nan(size(AA,1),1);
for i = 1:size(AA,1)
e(i,:) = get_Elevations(AA(i,1),AA(i,2));
e(i,:) = nan;
Using the example I get:
Error using getElevations (line 79)
Google Maps API requestor has exceeded quota
This is fantastic. Easy to use, good error checking, and worked right out of the box. I ran into a query limit when I tried an array of 4800 points, but 480 points retrieved results in under a second. Grids work too. NaNs throw a urlread error, which is not intuitive to debug--perhaps a NaN check would help.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!