def process_transport()

in gemini/agents/research-multi-agents/ev_agent/api_handler/api_01_NeighborhoodSummary.py [0:0]


    def process_transport(elements: List[Dict]) -> TransportFacilities:
        transport = TransportFacilities()
        for element in elements:
            tags = element.get("tags", {})

            # Public transport nodes
            if "public_transport" in tags:
                if tags["public_transport"] == "platform":
                    transport.transport_platforms += 1
                elif tags["public_transport"] == "station":
                    transport.bus_stations += 1

            # Specific transport types
            if tags.get("highway") == "bus_stop":
                transport.bus_stops += 1
            elif tags.get("railway") == "station":
                transport.train_stations += 1
            elif tags.get("railway") == "subway_entrance":
                transport.subway_stations += 1
            elif tags.get("railway") == "tram_stop":
                transport.tram_stops += 1
            elif tags.get("amenity") == "ferry_terminal":
                transport.ferry_terminals += 1
            elif tags.get("amenity") == "taxi":
                transport.taxi_stands += 1
            elif tags.get("amenity") == "bicycle_rental":
                transport.bike_rental += 1
        return transport