mtuq.graphics.attrs.PyGMTUtilities.get_resolution¶
- static PyGMTUtilities.get_resolution(lon_range, lat_range)[source]¶
Determines the appropriate PyGMT etopo grid resolution based on longitude and latitude ranges.
Parameters
lon_range
(float): The longitudinal range of the area of interest.lat_range
(float): The latitudinal range of the area of interest.Returns
resolution
(str): The resolution string for PyGMT, e.g., ‘01m’, ’15s’, …, based on the size of the specified area.Note
The resolution is determined based on predefined thresholds for the ranges, aiming to balance detail and performance for different scales of geographic areas
If lon_range > 10 or lat_range > 10, the resolution is ‘01m’.
If lon_range > 5 or lat_range > 5, the resolution is ’15s’.
If lon_range > 2 or lat_range > 2, the resolution is ’03s’.
If lon_range > 1 or lat_range > 1, the resolution is ’01s’.
Otherwise, the resolution is ‘05m’.