-------------------
New Features
~~~~~~~~~~~~
- Add a new method to ``RetrySession`` for getting the request head called
``RetrySession.head``. This is useful for getting the headers of a request
without having to make a full request which is useful for getting the
``Content-Length`` header for example, i.e., download size.
Bug Fixes
~~~~~~~~~
- Fix an issue in the decompose function, ``utils.bbox_decompose``, where the generated
bounding boxes might overlap in some cases. A new approach has been implemented based
on finding the number of required bounding boxes from max allowable no. of pixels and
total requested pixels without changing the input bounding box projection. This ensures
that the decomposed bounding boxes are not overlapping so ``xarray.open_mfdataset``
can be used without any issues.
Internal Changes
~~~~~~~~~~~~~~~~
- In the ``utils.match_crs`` function, don't perform any projection if the source
target CRS are the same.
- Improve type hints for CRS-related arguments of all functions by including string,
integer, and ``pyproj.CRS`` types.
- Add a new class method to ``WMSBase`` and ``WFSBase`` classes called
``get_service_options`` for retrieving the available layers, output formats, and
CRSs for a given service. Here's an example:
- Use ``pyupgrade`` package to update the type hinting annotations
to Python 3.10 style.
.. code-block:: python
from pygeoogc.core import WMSBase
url = "https://elevation.nationalmap.gov/arcgis/services/3DEPElevation/ImageServer/WMSServer"
wms = WMSBase(url, validation=False)
wms.get_service_options()
print(wms.available_layer)