[generator] retrieve socket:* OSM tags used by amenity:charging_station

Currently support the following socket types:
- type 1
- type 1 combo
- type 2 (wired or wo/ cable)
- type 2 combo
- chademo
- nacs

This commit also adds initial display of the socket types and power
the to Qt desktop app.

Signed-off-by: Séverin Lemaignan <severin@guakamole.org>
This commit is contained in:
Séverin Lemaignan
2025-09-10 00:08:16 +02:00
committed by skadge
parent de6953598b
commit f8d786958a
8 changed files with 330 additions and 2 deletions

View File

@@ -194,6 +194,8 @@ bool Metadata::TypeFromString(string_view k, Metadata::EType & outType)
outType = Metadata::FMD_OUTDOOR_SEATING;
else if (k == "network")
outType = Metadata::FMD_NETWORK;
else if (k.starts_with("socket:"))
outType = Metadata::FMD_CHARGE_SOCKETS;
else
return false;
@@ -315,6 +317,7 @@ string ToString(Metadata::EType type)
case Metadata::FMD_SELF_SERVICE: return "self_service";
case Metadata::FMD_OUTDOOR_SEATING: return "outdoor_seating";
case Metadata::FMD_NETWORK: return "network";
case Metadata::FMD_CHARGE_SOCKETS: CHECK(false, ("FMD_CHARGE_SOCKETS is a compound attribute."));
case Metadata::FMD_COUNT: CHECK(false, ("FMD_COUNT can not be used as a type."));
};