class_docstr: Web Feature Service (WFS) retrieval for Cartopy.
class_docstr_tok: ["Web","Feature","Service","(","WFS",")","retrieval","for","Cartopy","."]
docstr: Parameters
  ----------
  service
      The URL of a WFS, or an instance of
      :class:`owslib.wfs.WebFeatureService`.
  features
      The typename(s) of the features from the WFS that
      will be retrieved and made available as geometries.
  getfeature_extra_kwargs: optional
      Extra keyword args to pass to the service's `getfeature` call.
      Defaults to None
docstr_tok: ["Parameters","--","--","--","--","--","service","The","URL","of","a","WFS",",","or","an","instance","of",":","class",":","`","owslib.wfs.WebFeatureService","`",".","features","The","typename","(","s",")","of","the","features","from","the","WFS","that","will","be","retrieved","and","made","available","as","geometries",".","getfeature_extra_kwargs",":","optional","Extra","keyword","args","to","pass","to","the","service","'s","`","getfeature","`","call",".","Defaults","to","None"]
code: def __init__(self, service, features, getfeature_extra_kwargs=None):
      """
      Parameters
      ----------
      service
          The URL of a WFS, or an instance of
          :class:`owslib.wfs.WebFeatureService`.
      features
          The typename(s) of the features from the WFS that
          will be retrieved and made available as geometries.
      getfeature_extra_kwargs: optional
          Extra keyword args to pass to the service's `getfeature` call.
          Defaults to None
  
      """
      if WebFeatureService is None:
          raise ImportError(_OWSLIB_REQUIRED)
  
      if isinstance(service, str):
          # host name such as mapserver.gis.umn.edu or
          # agroenvgeo.data.inra.fr from full address
          # http://mapserver.gis.umn.edu/mapserver
          # or https://agroenvgeo.data.inra.fr:443/geoserver/wfs
          self.url = urlparse(service).hostname
          # WebFeatureService of owslib
          service = WebFeatureService(service)
      else:
          self.url = ""
  
      if isinstance(features, str):
          features = [features]
  
      if getfeature_extra_kwargs is None:
          getfeature_extra_kwargs = {}
  
      if not features:
          raise ValueError("One or more features must be specified.")
      for feature in features:
          if feature not in service.contents:
              raise ValueError(
                  f"The {feature!r} feature does not exist in this service."
              )
  
      self.service = service
      self.features = features
      self.getfeature_extra_kwargs = getfeature_extra_kwargs
  
      self._default_urn = None
  
imports: import collections
  import io
  import math
  from urllib.parse import urlparse
  import warnings
  import weakref
  from xml.etree import ElementTree
  import numpy
  from PIL import Image
  import shapely.geometry
  import cartopy.crs
  from cartopy.img_transform import warp_array
  from cartopy.io import LocatedImage, RasterSource
label_desc: Use image node_id 1 to create a new WFSGeometrySource object  with example: obj = WFSGeometrySource(service, features, getfeature_extra_kwargs)