From 4244d61c6b5678de11e16dc6e904b2f81ed0810b Mon Sep 17 00:00:00 2001
From: Michael Rudolf <rudolf@geo.tu-darmstadt.de>
Date: Mon, 17 Mar 2025 14:10:39 +0100
Subject: [PATCH] Added wms support for BW geola

---
 u4py/addons/web_services.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/u4py/addons/web_services.py b/u4py/addons/web_services.py
index 91d61cc..f1bad98 100644
--- a/u4py/addons/web_services.py
+++ b/u4py/addons/web_services.py
@@ -351,10 +351,16 @@ def wms_in_gdf_boundary(
     if layer in layers:
         lyr = wms[layer]
         # Get info from layer
-        lyr_crsopts = [
-            v[-1] for v in lyr.crs_list if v[-1].startswith("EPSG:")
-        ]  # use only a reduced set where the bounds are supplied
-
+        if hasattr(lyr, "crs_list"):
+            lyr_crsopts = [
+                v[-1] for v in lyr.crs_list if v[-1].startswith("EPSG:")
+            ]  # use only a reduced set where the bounds are supplied
+        elif hasattr(lyr, "crsOptions"):
+            lyr_crsopts = [
+                v[-1] for v in lyr.crs_list if v[-1].startswith("EPSG:")
+            ]
+        else:
+            raise AttributeError("Check the WMS layer crs attribute!")
         # Check if the input crs is supported
         if not str(bound_gdf.crs) in lyr_crsopts:
             # if not supported use default crs from layer
-- 
GitLab