cartopy.io.ogc_clients.WFSGeometrySource#

class cartopy.io.ogc_clients.WFSGeometrySource(service, features, getfeature_extra_kwargs=None)[source]#

Web Feature Service (WFS) retrieval for Cartopy.

Parameters:
  • service – The URL of a WFS, or an instance of 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

default_projection()[source]#

Return a cartopy.crs.Projection in which the WFS service can supply the requested features.

fetch_geometries(projection, extent)[source]#

Return any Point, Linestring or LinearRing geometries available from the WFS that lie within the specified extent.

Parameters:
  • projection (cartopy.crs.Projection) – The projection in which the extent is specified and in which the geometries should be returned. Only the default (native) projection is supported.

  • extent (four element tuple) – (min_x, max_x, min_y, max_y) tuple defining the geographic extent of the geometries to obtain.

Returns:

geoms – A list of Shapely geometries.