diff --git a/owslib/feature/wfs100.py b/owslib/feature/wfs100.py index ca53f979..e9688070 100644 --- a/owslib/feature/wfs100.py +++ b/owslib/feature/wfs100.py @@ -7,6 +7,8 @@ # ============================================================================= import itertools +import logging + from owslib import util from io import BytesIO @@ -31,7 +33,15 @@ AbstractContentMetadata, ) -import pyproj +LOGGER = logging.getLogger(__name__) + +has_pyproj = False + +try: + import pyproj + has_pyproj = True +except ImportError: + LOGGER.warning('pyproj not installed') n = Namespaces() WFS_NAMESPACE = n.get_namespace("wfs") @@ -394,7 +404,7 @@ def __init__( # transform wgs84 bbox from given default bboxt self.boundingBoxWGS84 = None - if b is not None and srs is not None: + if has_pyproj and b is not None and srs is not None: wgs84 = pyproj.CRS.from_epsg(4326) try: src_srs = pyproj.CRS.from_string(srs.text) diff --git a/requirements.txt b/requirements.txt index 2ed3ad4c..05622e14 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ python-dateutil>=1.5 pytz requests>=1.0 -pyproj pyyaml dataclasses; python_version < '3.7'