in gemini/agents/research-multi-agents/ev_agent/api_handler/api_01_NeighborhoodSummary.py [0:0]
def process_buildings(elements: List[Dict]) -> Buildings:
buildings = Buildings()
for element in elements:
if element.get("type") != "way":
continue
tags = element.get("tags", {})
if "building" in tags:
if tags["building"] in ["residential", "house", "detached"]:
buildings.residential += 1
elif tags["building"] == "apartments":
buildings.apartments += 1
elif tags["building"] == "commercial":
buildings.commercial += 1
elif tags["building"] == "retail":
buildings.retail += 1
elif tags["building"] == "industrial":
buildings.industrial += 1
elif tags["building"] == "warehouse":
buildings.warehouse += 1
elif tags["building"] == "office":
buildings.office += 1
elif tags["building"] == "government":
buildings.government += 1
elif tags["building"] == "hospital":
buildings.hospital += 1
elif tags["building"] == "school":
buildings.school += 1
elif tags["building"] == "university":
buildings.university += 1
elif tags["building"] == "hotel":
buildings.hotel += 1
elif tags["building"] == "parking":
buildings.parking += 1
return buildings