class_docstr: Geocoder using the IGN France GeoCoder OpenLS API.
  
  Documentation at:
      https://geoservices.ign.fr/services-web-essentiels
class_docstr_tok: ["Geocoder","using","the","IGN","France","GeoCoder","OpenLS","API",".","Documentation","at",":","https",":","\/\/geoservices.ign.fr\/services-web-essentiels"]
docstr: Transform the xml ElementTree due to XML webservice return to json
docstr_tok: ["Transform","the","xml","ElementTree","due","to","XML","webservice","return","to","json"]
code: def _xml_to_json_places(self, tree, is_reverse=False):
      """
      Transform the xml ElementTree due to XML webservice return to json
      """
  
      select_multi = (
          "GeocodedAddress"
          if not is_reverse
          else "ReverseGeocodedLocation"
      )
  
      adresses = tree.findall(".//" + select_multi)
      places = []
  
      sel_pl = './/Address/Place[@type="{}"]'
      for adr in adresses:
          el = {}
          el["pos"] = adr.find("./Point/pos")
          el["street"] = adr.find(".//Address/StreetAddress/Street")
          el["freeformaddress"] = adr.find(".//Address/freeFormAddress")
          el["municipality"] = adr.find(sel_pl.format("Municipality"))
          el["numero"] = adr.find(sel_pl.format("Numero"))
          el["feuille"] = adr.find(sel_pl.format("Feuille"))
          el["section"] = adr.find(sel_pl.format("Section"))
          el["departement"] = adr.find(sel_pl.format("Departement"))
          el["commune_absorbee"] = adr.find(
              sel_pl.format("CommuneAbsorbee")
          )
          el["commune"] = adr.find(sel_pl.format("Commune"))
          el["insee"] = adr.find(sel_pl.format("INSEE"))
          el["qualite"] = adr.find(sel_pl.format("Qualite"))
          el["territoire"] = adr.find(sel_pl.format("Territoire"))
          el["id"] = adr.find(sel_pl.format("ID"))
          el["id_tr"] = adr.find(sel_pl.format("ID_TR"))
          el["bbox"] = adr.find(sel_pl.format("Bbox"))
          el["nature"] = adr.find(sel_pl.format("Nature"))
          el["postal_code"] = adr.find(".//Address/PostalCode")
          el["extended_geocode_match_code"] = adr.find(
              ".//ExtendedGeocodeMatchCode"
          )
  
          place = {}
  
          def testContentAttrib(selector, key):
              """
              Helper to select by attribute and if not attribute,
              value set to empty string
              """
              return (
                  selector.attrib.get(key, None)
                  if selector is not None
                  else None
              )
  
          place["accuracy"] = testContentAttrib(
              adr.find(".//GeocodeMatchCode"), "accuracy"
          )
  
          place["match_type"] = testContentAttrib(
              adr.find(".//GeocodeMatchCode"), "matchType"
          )
  
          place["building"] = testContentAttrib(
              adr.find(".//Address/StreetAddress/Building"), "number"
          )
  
          place["search_centre_distance"] = testContentAttrib(
              adr.find(".//SearchCentreDistance"), "value"
          )
  
          for key, value in iter(el.items()):
              if value is not None:
                  place[key] = value.text
              else:
                  place[key] = None
  
          # We check if lat lng is not empty and unpack accordingly
          if place["pos"]:
              lat, lng = place["pos"].split(" ")
              place["lat"] = lat.strip()
              place["lng"] = lng.strip()
          else:
              place["lat"] = place["lng"] = None
  
          # We removed the unused key
          place.pop("pos", None)
          places.append(place)
  
      return places
  
file_path: geopy/geopy/geocoders/ignfrance.py
imports: import warnings
  import xml.etree.ElementTree
  from functools import partial
  from urllib.parse import urlencode
  from geopy.exc import GeocoderQueryError
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 5 for calling the IGNFrance obj's underlying member method code with example usage: obj._xml_to_json_places(tree, is_reverse) and returns: places, unknown