class_docstr: Web Feature Service (WFS) retrieval for Cartopy.
class_docstr_tok: ["Web","Feature","Service","(","WFS",")","retrieval","for","Cartopy","."]
docstr: Return the x, y coordinate values for all the geometries in
  a given`node`.
  
  Parameters
  ----------
  node: :class:`xml.etree.ElementTree.Element`
      Node of the parsed XML response.
  find_str: string
      A search string used to match subelements that contain
      the coordinates of interest, for example:
      './/{http://www.opengis.net/gml}LineString'
  
  Returns
  -------
  data
      A list of (srsName, x_vals, y_vals) tuples.
docstr_tok: ["Return","the","x",",","y","coordinate","values","for","all","the","geometries","in","a","given","`","node","`",".","Parameters","--","--","--","--","--","node",":",":","class",":","`","xml.etree.ElementTree.Element","`","Node","of","the","parsed","XML","response",".","find_str",":","string","A","search","string","used","to","match","subelements","that","contain","the","coordinates","of","interest",",","for","example",":","'.\/\/","{","http",":","\/\/www.opengis.net\/gml","}","LineString'","Returns","--","--","--","-","data","A","list","of","(","srsName",",","x_vals",",","y_vals",")","tuples","."]
code: def _find_polygon_coords(self, node, find_str):
      """
      Return the x, y coordinate values for all the geometries in
      a given`node`.
  
      Parameters
      ----------
      node: :class:`xml.etree.ElementTree.Element`
          Node of the parsed XML response.
      find_str: string
          A search string used to match subelements that contain
          the coordinates of interest, for example:
          './/{http://www.opengis.net/gml}LineString'
  
      Returns
      -------
      data
          A list of (srsName, x_vals, y_vals) tuples.
  
      """
  
      data = []
      for polygon in node.findall(find_str):
          feature_srs = polygon.attrib.get("srsName")
          x, y = [], []
  
          # We can have nodes called `coordinates` or `coord`.
          coordinates_find_str = f"{_GML_NS}coordinates"
          coords_find_str = f"{_GML_NS}coord"
  
          if self._node_has_child(polygon, coordinates_find_str):
              points = polygon.findtext(coordinates_find_str)
              coords = points.strip().split(" ")
              for coord in coords:
                  x_val, y_val = coord.split(",")
                  x.append(float(x_val))
                  y.append(float(y_val))
          elif self._node_has_child(polygon, coords_find_str):
              for coord in polygon.findall(coords_find_str):
                  x.append(float(coord.findtext(f"{_GML_NS}X")))
                  y.append(float(coord.findtext(f"{_GML_NS}Y")))
          else:
              raise ValueError(
                  "Unable to find or parse coordinate values "
                  "from the XML."
              )
  
          data.append((feature_srs, x, y))
      return data
  
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 5 for calling the WFSGeometrySource obj's underlying member method code with example usage: obj._find_polygon_coords(node, find_str) and returns: data