Problem
If the lat,lon requested in geopressure_ts() is over water, GeoPresseAPI returns an empty csv. Currently the error message warns the user of this issue with a link to google map to copy paste. For instance:
> Returned csv file is empty. Check that the time range is none-empty and that the location is not on water: maps.google.com/maps?q=0,0
This problem appear when we query the most likely map of pressure returned by geopressure_map() and geopressure_map2path()
Solution 1
On GeoPressureAPI, we could accept location near water and move them to the closest shore, ideally return a warning message. @mgravey , is that possible? what could be done without reducing computational efficiency?
Solution 2
Check before making the query in R. This would require to use another package, download external data (ERA5-Land is 50MB) otherwise the code below get land polygon for 2MB
Problem If the lat,lon requested in
geopressure_ts()
is over water, GeoPresseAPI returns an empty csv. Currently the error message warns the user of this issue with a link to google map to copy paste. For instance:This problem appear when we query the most likely map of pressure returned by
geopressure_map()
andgeopressure_map2path()
Solution 1 On GeoPressureAPI, we could accept location near water and move them to the closest shore, ideally return a warning message. @mgravey , is that possible? what could be done without reducing computational efficiency?
Solution 2 Check before making the query in R. This would require to use another package, download external data (ERA5-Land is 50MB) otherwise the code below get land polygon for 2MB