Skip to content

Commit

Permalink
Add country code to incident metadata (valhalla#3169)
Browse files Browse the repository at this point in the history
Added country code (iso 2 & 3 char) to incident metadata.
  • Loading branch information
mandeepsandhu committed Jun 28, 2021
1 parent cf3703f commit 8122861
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 57 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* CHORE: Enables -Wall on sif sources [#3178](https://github.com/valhalla/valhalla/pull/3178)
* ADDED: Allow going through accessible `barrier=bollard` and penalize routing through it, when the access is private [#3175](https://github.com/valhalla/valhalla/pull/3175)

* ADDED: Add country code to incident metadata [#3169](https://github.com/valhalla/valhalla/pull/3169)

## Release Date: 2021-05-26 Valhalla 3.1.2
* **Removed**
Expand Down
3 changes: 2 additions & 1 deletion proto/incidents.proto
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ message IncidentsTile {

// IncidentMetadata id
uint64 id = 128;
// Country code
// Country code (2 & 3 char codes)
string iso_3166_1_alpha2 = 129;
string iso_3166_1_alpha3 = 130;
}
}
55 changes: 55 additions & 0 deletions src/baldr/admin.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,63 @@
#include "baldr/admin.h"

namespace {

// For transforming ISO 3166-1 country codes from alpha2 to alpha3
std::unordered_map<std::string, std::string> iso2_to_iso3 =
{{"AD", "AND"}, {"AE", "ARE"}, {"AF", "AFG"}, {"AG", "ATG"}, {"AI", "AIA"}, {"AL", "ALB"},
{"AM", "ARM"}, {"AO", "AGO"}, {"AQ", "ATA"}, {"AR", "ARG"}, {"AS", "ASM"}, {"AT", "AUT"},
{"AU", "AUS"}, {"AW", "ABW"}, {"AX", "ALA"}, {"AZ", "AZE"}, {"BA", "BIH"}, {"BB", "BRB"},
{"BD", "BGD"}, {"BE", "BEL"}, {"BF", "BFA"}, {"BG", "BGR"}, {"BH", "BHR"}, {"BI", "BDI"},
{"BJ", "BEN"}, {"BL", "BLM"}, {"BM", "BMU"}, {"BN", "BRN"}, {"BO", "BOL"}, {"BQ", "BES"},
{"BR", "BRA"}, {"BS", "BHS"}, {"BT", "BTN"}, {"BV", "BVT"}, {"BW", "BWA"}, {"BY", "BLR"},
{"BZ", "BLZ"}, {"CA", "CAN"}, {"CC", "CCK"}, {"CD", "COD"}, {"CF", "CAF"}, {"CG", "COG"},
{"CH", "CHE"}, {"CI", "CIV"}, {"CK", "COK"}, {"CL", "CHL"}, {"CM", "CMR"}, {"CN", "CHN"},
{"CO", "COL"}, {"CR", "CRI"}, {"CU", "CUB"}, {"CV", "CPV"}, {"CW", "CUW"}, {"CX", "CXR"},
{"CY", "CYP"}, {"CZ", "CZE"}, {"DE", "DEU"}, {"DJ", "DJI"}, {"DK", "DNK"}, {"DM", "DMA"},
{"DO", "DOM"}, {"DZ", "DZA"}, {"EC", "ECU"}, {"EE", "EST"}, {"EG", "EGY"}, {"EH", "ESH"},
{"ER", "ERI"}, {"ES", "ESP"}, {"ET", "ETH"}, {"FI", "FIN"}, {"FJ", "FJI"}, {"FK", "FLK"},
{"FM", "FSM"}, {"FO", "FRO"}, {"FR", "FRA"}, {"GA", "GAB"}, {"GB", "GBR"}, {"GD", "GRD"},
{"GE", "GEO"}, {"GF", "GUF"}, {"GG", "GGY"}, {"GH", "GHA"}, {"GI", "GIB"}, {"GL", "GRL"},
{"GM", "GMB"}, {"GN", "GIN"}, {"GP", "GLP"}, {"GQ", "GNQ"}, {"GR", "GRC"}, {"GS", "SGS"},
{"GT", "GTM"}, {"GU", "GUM"}, {"GW", "GNB"}, {"GY", "GUY"}, {"HK", "HKG"}, {"HM", "HMD"},
{"HN", "HND"}, {"HR", "HRV"}, {"HT", "HTI"}, {"HU", "HUN"}, {"ID", "IDN"}, {"IE", "IRL"},
{"IL", "ISR"}, {"IM", "IMN"}, {"IN", "IND"}, {"IO", "IOT"}, {"IQ", "IRQ"}, {"IR", "IRN"},
{"IS", "ISL"}, {"IT", "ITA"}, {"JE", "JEY"}, {"JM", "JAM"}, {"JO", "JOR"}, {"JP", "JPN"},
{"KE", "KEN"}, {"KG", "KGZ"}, {"KH", "KHM"}, {"KI", "KIR"}, {"KM", "COM"}, {"KN", "KNA"},
{"KP", "PRK"}, {"KR", "KOR"}, {"XK", "XKX"}, {"KW", "KWT"}, {"KY", "CYM"}, {"KZ", "KAZ"},
{"LA", "LAO"}, {"LB", "LBN"}, {"LC", "LCA"}, {"LI", "LIE"}, {"LK", "LKA"}, {"LR", "LBR"},
{"LS", "LSO"}, {"LT", "LTU"}, {"LU", "LUX"}, {"LV", "LVA"}, {"LY", "LBY"}, {"MA", "MAR"},
{"MC", "MCO"}, {"MD", "MDA"}, {"ME", "MNE"}, {"MF", "MAF"}, {"MG", "MDG"}, {"MH", "MHL"},
{"MK", "MKD"}, {"ML", "MLI"}, {"MM", "MMR"}, {"MN", "MNG"}, {"MO", "MAC"}, {"MP", "MNP"},
{"MQ", "MTQ"}, {"MR", "MRT"}, {"MS", "MSR"}, {"MT", "MLT"}, {"MU", "MUS"}, {"MV", "MDV"},
{"MW", "MWI"}, {"MX", "MEX"}, {"MY", "MYS"}, {"MZ", "MOZ"}, {"NA", "NAM"}, {"NC", "NCL"},
{"NE", "NER"}, {"NF", "NFK"}, {"NG", "NGA"}, {"NI", "NIC"}, {"NL", "NLD"}, {"NO", "NOR"},
{"NP", "NPL"}, {"NR", "NRU"}, {"NU", "NIU"}, {"NZ", "NZL"}, {"OM", "OMN"}, {"PA", "PAN"},
{"PE", "PER"}, {"PF", "PYF"}, {"PG", "PNG"}, {"PH", "PHL"}, {"PK", "PAK"}, {"PL", "POL"},
{"PM", "SPM"}, {"PN", "PCN"}, {"PR", "PRI"}, {"PS", "PSE"}, {"PT", "PRT"}, {"PW", "PLW"},
{"PY", "PRY"}, {"QA", "QAT"}, {"RE", "REU"}, {"RO", "ROU"}, {"RS", "SRB"}, {"RU", "RUS"},
{"RW", "RWA"}, {"SA", "SAU"}, {"SB", "SLB"}, {"SC", "SYC"}, {"SD", "SDN"}, {"SS", "SSD"},
{"SE", "SWE"}, {"SG", "SGP"}, {"SH", "SHN"}, {"SI", "SVN"}, {"SJ", "SJM"}, {"SK", "SVK"},
{"SL", "SLE"}, {"SM", "SMR"}, {"SN", "SEN"}, {"SO", "SOM"}, {"SR", "SUR"}, {"ST", "STP"},
{"SV", "SLV"}, {"SX", "SXM"}, {"SY", "SYR"}, {"SZ", "SWZ"}, {"TC", "TCA"}, {"TD", "TCD"},
{"TF", "ATF"}, {"TG", "TGO"}, {"TH", "THA"}, {"TJ", "TJK"}, {"TK", "TKL"}, {"TL", "TLS"},
{"TM", "TKM"}, {"TN", "TUN"}, {"TO", "TON"}, {"TR", "TUR"}, {"TT", "TTO"}, {"TV", "TUV"},
{"TW", "TWN"}, {"TZ", "TZA"}, {"UA", "UKR"}, {"UG", "UGA"}, {"UM", "UMI"}, {"US", "USA"},
{"UY", "URY"}, {"UZ", "UZB"}, {"VA", "VAT"}, {"VC", "VCT"}, {"VE", "VEN"}, {"VG", "VGB"},
{"VI", "VIR"}, {"VN", "VNM"}, {"VU", "VUT"}, {"WF", "WLF"}, {"WS", "WSM"}, {"YE", "YEM"},
{"YT", "MYT"}, {"ZA", "ZAF"}, {"ZM", "ZMB"}, {"ZW", "ZWE"}, {"CS", "SCG"}, {"AN", "ANT"}};
} // namespace

namespace valhalla {
namespace baldr {

// Returns the 3-char equivalent of the 2-char country code (iso_3166_1_alpha2) or an empty string
// if the 2-char code is unknown
std::string get_iso_3166_1_alpha3(const std::string& iso_3166_1_alpha2) {
auto iter = iso2_to_iso3.find(iso_3166_1_alpha2);
return iter == iso2_to_iso3.end() ? std::string() : iter->second;
}

// Constructor given parameters.
Admin::Admin(const uint32_t country_offset,
const uint32_t state_offset,
Expand Down
28 changes: 25 additions & 3 deletions src/thor/triplegbuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <unordered_map>
#include <utility>

#include "baldr/admin.h"
#include "baldr/datetime.h"
#include "baldr/edgeinfo.h"
#include "baldr/graphconstants.h"
Expand Down Expand Up @@ -92,6 +93,15 @@ void AssignAdmins(const AttributesController& controller,
}
}

// Helper function to get the iso country code from an edge using its endnode
inline std::string country_code_from_edge(const graph_tile_ptr& tile,
const valhalla::baldr::DirectedEdge& de) {
if (!tile) {
return std::string();
}
return tile->admininfo(tile->node(de.endnode())->admin_index()).country_iso();
}

/**
* Used to add or update incidents attached to the provided leg. We could do something more exotic to
* avoid linear scan, like keeping a separate lookup outside of the pbf
Expand All @@ -102,7 +112,9 @@ void AssignAdmins(const AttributesController& controller,
void UpdateIncident(const std::shared_ptr<const valhalla::IncidentsTile>& incidents_tile,
TripLeg& leg,
const valhalla::IncidentsTile::Location* incident_location,
uint32_t index) {
uint32_t index,
const graph_tile_ptr& tile,
const valhalla::baldr::DirectedEdge& de) {
const uint64_t current_incident_id =
valhalla::baldr::getIncidentMetadata(incidents_tile, *incident_location).id();
auto found = std::find_if(leg.mutable_incidents()->begin(), leg.mutable_incidents()->end(),
Expand All @@ -120,6 +132,16 @@ void UpdateIncident(const std::shared_ptr<const valhalla::IncidentsTile>& incide
const auto& meta = valhalla::baldr::getIncidentMetadata(incidents_tile, *incident_location);
*new_incident->mutable_metadata() = meta;

// Set iso country code (2 & 3 char codes) on the new incident obj created for this leg
std::string country_code_iso_2 = country_code_from_edge(tile, de);
if (!country_code_iso_2.empty()) {
new_incident->mutable_metadata()->set_iso_3166_1_alpha2(country_code_iso_2.c_str());
}
std::string country_code_iso_3 = valhalla::baldr::get_iso_3166_1_alpha3(country_code_iso_2);
if (!country_code_iso_3.empty()) {
new_incident->mutable_metadata()->set_iso_3166_1_alpha3(country_code_iso_3.c_str());
}

new_incident->set_begin_shape_index(index);
new_incident->set_end_shape_index(index);
}
Expand Down Expand Up @@ -243,7 +265,7 @@ void SetShapeAttributes(const AttributesController& controller,
// if this is clipped at the beginning of the edge then its not a new cut but we still need to
// attach the incidents information to the leg
if (offset == src_pct) {
UpdateIncident(incidents.tile, leg, &incident, shape_begin);
UpdateIncident(incidents.tile, leg, &incident, shape_begin, tile, *edge);
continue;
}

Expand Down Expand Up @@ -362,7 +384,7 @@ void SetShapeAttributes(const AttributesController& controller,
// Set the incidents if we just cut or we are at the end
if ((shift || i == shape.size() - 1) && !cut_itr->incidents.empty()) {
for (const auto* incident : cut_itr->incidents) {
UpdateIncident(incidents.tile, leg, incident, i);
UpdateIncident(incidents.tile, leg, incident, i, tile, *edge);
}
}

Expand Down
57 changes: 9 additions & 48 deletions src/tyr/route_serializer_osrm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,51 +134,6 @@ inline unsigned getFittedZoom(Coordinate south_west, Coordinate north_east) {
return MIN_ZOOM;
}

// For transforming ISO 3166-1 country codes from alpha2 to alpha3
std::unordered_map<std::string, std::string> iso2_to_iso3 =
{{"AD", "AND"}, {"AE", "ARE"}, {"AF", "AFG"}, {"AG", "ATG"}, {"AI", "AIA"}, {"AL", "ALB"},
{"AM", "ARM"}, {"AO", "AGO"}, {"AQ", "ATA"}, {"AR", "ARG"}, {"AS", "ASM"}, {"AT", "AUT"},
{"AU", "AUS"}, {"AW", "ABW"}, {"AX", "ALA"}, {"AZ", "AZE"}, {"BA", "BIH"}, {"BB", "BRB"},
{"BD", "BGD"}, {"BE", "BEL"}, {"BF", "BFA"}, {"BG", "BGR"}, {"BH", "BHR"}, {"BI", "BDI"},
{"BJ", "BEN"}, {"BL", "BLM"}, {"BM", "BMU"}, {"BN", "BRN"}, {"BO", "BOL"}, {"BQ", "BES"},
{"BR", "BRA"}, {"BS", "BHS"}, {"BT", "BTN"}, {"BV", "BVT"}, {"BW", "BWA"}, {"BY", "BLR"},
{"BZ", "BLZ"}, {"CA", "CAN"}, {"CC", "CCK"}, {"CD", "COD"}, {"CF", "CAF"}, {"CG", "COG"},
{"CH", "CHE"}, {"CI", "CIV"}, {"CK", "COK"}, {"CL", "CHL"}, {"CM", "CMR"}, {"CN", "CHN"},
{"CO", "COL"}, {"CR", "CRI"}, {"CU", "CUB"}, {"CV", "CPV"}, {"CW", "CUW"}, {"CX", "CXR"},
{"CY", "CYP"}, {"CZ", "CZE"}, {"DE", "DEU"}, {"DJ", "DJI"}, {"DK", "DNK"}, {"DM", "DMA"},
{"DO", "DOM"}, {"DZ", "DZA"}, {"EC", "ECU"}, {"EE", "EST"}, {"EG", "EGY"}, {"EH", "ESH"},
{"ER", "ERI"}, {"ES", "ESP"}, {"ET", "ETH"}, {"FI", "FIN"}, {"FJ", "FJI"}, {"FK", "FLK"},
{"FM", "FSM"}, {"FO", "FRO"}, {"FR", "FRA"}, {"GA", "GAB"}, {"GB", "GBR"}, {"GD", "GRD"},
{"GE", "GEO"}, {"GF", "GUF"}, {"GG", "GGY"}, {"GH", "GHA"}, {"GI", "GIB"}, {"GL", "GRL"},
{"GM", "GMB"}, {"GN", "GIN"}, {"GP", "GLP"}, {"GQ", "GNQ"}, {"GR", "GRC"}, {"GS", "SGS"},
{"GT", "GTM"}, {"GU", "GUM"}, {"GW", "GNB"}, {"GY", "GUY"}, {"HK", "HKG"}, {"HM", "HMD"},
{"HN", "HND"}, {"HR", "HRV"}, {"HT", "HTI"}, {"HU", "HUN"}, {"ID", "IDN"}, {"IE", "IRL"},
{"IL", "ISR"}, {"IM", "IMN"}, {"IN", "IND"}, {"IO", "IOT"}, {"IQ", "IRQ"}, {"IR", "IRN"},
{"IS", "ISL"}, {"IT", "ITA"}, {"JE", "JEY"}, {"JM", "JAM"}, {"JO", "JOR"}, {"JP", "JPN"},
{"KE", "KEN"}, {"KG", "KGZ"}, {"KH", "KHM"}, {"KI", "KIR"}, {"KM", "COM"}, {"KN", "KNA"},
{"KP", "PRK"}, {"KR", "KOR"}, {"XK", "XKX"}, {"KW", "KWT"}, {"KY", "CYM"}, {"KZ", "KAZ"},
{"LA", "LAO"}, {"LB", "LBN"}, {"LC", "LCA"}, {"LI", "LIE"}, {"LK", "LKA"}, {"LR", "LBR"},
{"LS", "LSO"}, {"LT", "LTU"}, {"LU", "LUX"}, {"LV", "LVA"}, {"LY", "LBY"}, {"MA", "MAR"},
{"MC", "MCO"}, {"MD", "MDA"}, {"ME", "MNE"}, {"MF", "MAF"}, {"MG", "MDG"}, {"MH", "MHL"},
{"MK", "MKD"}, {"ML", "MLI"}, {"MM", "MMR"}, {"MN", "MNG"}, {"MO", "MAC"}, {"MP", "MNP"},
{"MQ", "MTQ"}, {"MR", "MRT"}, {"MS", "MSR"}, {"MT", "MLT"}, {"MU", "MUS"}, {"MV", "MDV"},
{"MW", "MWI"}, {"MX", "MEX"}, {"MY", "MYS"}, {"MZ", "MOZ"}, {"NA", "NAM"}, {"NC", "NCL"},
{"NE", "NER"}, {"NF", "NFK"}, {"NG", "NGA"}, {"NI", "NIC"}, {"NL", "NLD"}, {"NO", "NOR"},
{"NP", "NPL"}, {"NR", "NRU"}, {"NU", "NIU"}, {"NZ", "NZL"}, {"OM", "OMN"}, {"PA", "PAN"},
{"PE", "PER"}, {"PF", "PYF"}, {"PG", "PNG"}, {"PH", "PHL"}, {"PK", "PAK"}, {"PL", "POL"},
{"PM", "SPM"}, {"PN", "PCN"}, {"PR", "PRI"}, {"PS", "PSE"}, {"PT", "PRT"}, {"PW", "PLW"},
{"PY", "PRY"}, {"QA", "QAT"}, {"RE", "REU"}, {"RO", "ROU"}, {"RS", "SRB"}, {"RU", "RUS"},
{"RW", "RWA"}, {"SA", "SAU"}, {"SB", "SLB"}, {"SC", "SYC"}, {"SD", "SDN"}, {"SS", "SSD"},
{"SE", "SWE"}, {"SG", "SGP"}, {"SH", "SHN"}, {"SI", "SVN"}, {"SJ", "SJM"}, {"SK", "SVK"},
{"SL", "SLE"}, {"SM", "SMR"}, {"SN", "SEN"}, {"SO", "SOM"}, {"SR", "SUR"}, {"ST", "STP"},
{"SV", "SLV"}, {"SX", "SXM"}, {"SY", "SYR"}, {"SZ", "SWZ"}, {"TC", "TCA"}, {"TD", "TCD"},
{"TF", "ATF"}, {"TG", "TGO"}, {"TH", "THA"}, {"TJ", "TJK"}, {"TK", "TKL"}, {"TL", "TLS"},
{"TM", "TKM"}, {"TN", "TUN"}, {"TO", "TON"}, {"TR", "TUR"}, {"TT", "TTO"}, {"TV", "TUV"},
{"TW", "TWN"}, {"TZ", "TZA"}, {"UA", "UKR"}, {"UG", "UGA"}, {"UM", "UMI"}, {"US", "USA"},
{"UY", "URY"}, {"UZ", "UZB"}, {"VA", "VAT"}, {"VC", "VCT"}, {"VE", "VEN"}, {"VG", "VGB"},
{"VI", "VIR"}, {"VN", "VNM"}, {"VU", "VUT"}, {"WF", "WLF"}, {"WS", "WSM"}, {"YE", "YEM"},
{"YT", "MYT"}, {"ZA", "ZAF"}, {"ZM", "ZMB"}, {"ZW", "ZWE"}, {"CS", "SCG"}, {"AN", "ANT"}};

// Sign style and unit conventions for speed limit signs by country.
// Most countries use Vienna style and km/h, but the countries below
// use MUTCD and/or mph conventions.
Expand Down Expand Up @@ -1534,9 +1489,9 @@ json::ArrayPtr serialize_legs(const google::protobuf::RepeatedPtrField<valhalla:
auto admin_map = json::map({});
if (admin.has_country_code()) {
admin_map->emplace("iso_3166_1", admin.country_code());
auto country_iso3 = iso2_to_iso3.find(admin.country_code());
if (country_iso3 != iso2_to_iso3.end()) {
admin_map->emplace("iso_3166_1_alpha3", country_iso3->second);
auto country_iso3 = valhalla::baldr::get_iso_3166_1_alpha3(admin.country_code());
if (!country_iso3.empty()) {
admin_map->emplace("iso_3166_1_alpha3", country_iso3);
}
}
// TODO: iso_3166_2 state code
Expand Down Expand Up @@ -1766,6 +1721,7 @@ TEST(RouteSerializerOsrm, testserializeIncidents) {
meta.mutable_congestion()->set_value(33);
meta.add_alertc_codes(11);
meta.set_iso_3166_1_alpha2("AU");
meta.set_iso_3166_1_alpha3("AUS");
*incident->mutable_metadata() = meta;

// Finally call the function under test to serialize to json
Expand All @@ -1785,6 +1741,7 @@ TEST(RouteSerializerOsrm, testserializeIncidents) {
"id": "18446744073709551615",
"type": "weather",
"iso_3166_1_alpha2": "AU",
"iso_3166_1_alpha3": "AUS",
"creation_time": "2020-08-12T14:17:09Z",
"start_time": "2020-08-12T14:18:49Z",
"end_time": "2020-08-12T14:47:09Z",
Expand Down Expand Up @@ -1837,6 +1794,7 @@ TEST(RouteSerializerOsrm, testserializeIncidentsMultipleIncidentsSingleEdge) {
meta.set_creation_time(creation_time);
meta.set_type(valhalla::IncidentsTile::Metadata::WEATHER);
meta.set_iso_3166_1_alpha2("SE");
meta.set_iso_3166_1_alpha3("SWE");
*incident->mutable_metadata() = meta;
}
{
Expand All @@ -1853,6 +1811,7 @@ TEST(RouteSerializerOsrm, testserializeIncidentsMultipleIncidentsSingleEdge) {
meta.set_end_time(creation_time + 1800);
meta.set_type(valhalla::IncidentsTile::Metadata::ACCIDENT);
meta.set_iso_3166_1_alpha2("SE");
meta.set_iso_3166_1_alpha3("SWE");
*incident->mutable_metadata() = meta;
}

Expand All @@ -1875,6 +1834,7 @@ TEST(RouteSerializerOsrm, testserializeIncidentsMultipleIncidentsSingleEdge) {
"creation_time": "2020-08-12T14:17:09Z",
"type": "weather",
"iso_3166_1_alpha2": "SE",
"iso_3166_1_alpha3": "SWE",
"lanes_blocked": [],
"geometry_index_start": 87,
"geometry_index_end": 92
Expand All @@ -1886,6 +1846,7 @@ TEST(RouteSerializerOsrm, testserializeIncidentsMultipleIncidentsSingleEdge) {
"end_time": "2020-08-12T14:46:40Z",
"type": "accident",
"iso_3166_1_alpha2": "SE",
"iso_3166_1_alpha3": "SWE",
"lanes_blocked": [],
"geometry_index_start": 21,
"geometry_index_end": 104
Expand Down
4 changes: 4 additions & 0 deletions src/tyr/serializers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ void serializeIncidentProperties(rapidjson::Writer<rapidjson::StringBuffer>& wri
writer.Key(key_prefix + "iso_3166_1_alpha2");
writer.String(incident_metadata.iso_3166_1_alpha2());
}
if (!incident_metadata.iso_3166_1_alpha3().empty()) {
writer.Key(key_prefix + "iso_3166_1_alpha3");
writer.String(incident_metadata.iso_3166_1_alpha3());
}
if (!incident_metadata.description().empty()) {
writer.Key(key_prefix + "description");
writer.String(incident_metadata.description());
Expand Down
Loading

0 comments on commit 8122861

Please sign in to comment.