diff --git a/mobility_data/importers/loading_unloading_places.py b/mobility_data/importers/loading_unloading_places.py index 0e6e9d7ca..b378564ff 100644 --- a/mobility_data/importers/loading_unloading_places.py +++ b/mobility_data/importers/loading_unloading_places.py @@ -26,6 +26,9 @@ class LoadingPlace(MobileUnitDataBase): "Saavutettavuus": { "type": FieldTypes.MULTILANG_STRING, }, + "rajoitukset": { + "type": FieldTypes.MULTILANG_STRING, + }, "lastauspiste": { "type": FieldTypes.MULTILANG_STRING, }, @@ -33,9 +36,25 @@ class LoadingPlace(MobileUnitDataBase): "type": FieldTypes.MULTILANG_STRING, }, "paikkoja_y": {"type": FieldTypes.INTEGER}, - "Lisätieto": { + "max_aika_h": {"type": FieldTypes.STRING}, + "max_aika_m": {"type": FieldTypes.STRING}, + "rajoitus_m": {"type": FieldTypes.STRING}, + "rajoitus_l": {"type": FieldTypes.STRING}, + "rajoitus_s": {"type": FieldTypes.STRING}, + "rajoitettu_ark": {"type": FieldTypes.STRING}, + "rajoitettu_l": {"type": FieldTypes.STRING}, + "rajoitettu_s": {"type": FieldTypes.STRING}, + "voimassaol": {"type": FieldTypes.STRING}, + "varattu_tie_ajoon": {"type": FieldTypes.MULTILANG_STRING}, + "erityisluv": {"type": FieldTypes.MULTILANG_STRING}, + "vuoropys": {"type": FieldTypes.STRING}, + "päiväys": {"type": FieldTypes.STRING}, + "lisätieto": { "type": FieldTypes.MULTILANG_STRING, }, + "maksuvyöh": {"type": FieldTypes.STRING}, + "rajoit_lis": {"type": FieldTypes.MULTILANG_STRING}, + "talvikunno": {"type": FieldTypes.STRING}, } def __init__(self, feature): @@ -102,6 +121,8 @@ def __init__(self, feature): self.extra[field_name][lang] = strings[i].strip() case FieldTypes.INTEGER: self.extra[field_name] = feature[field].as_int() + case FieldTypes.STRING: + self.extra[field_name] = feature[field].as_string() def get_geojson_file_name(): diff --git a/mobility_data/tests/test_import_loading_and_unloading_places.py b/mobility_data/tests/test_import_loading_and_unloading_places.py index 7b17af605..1d4494ad8 100644 --- a/mobility_data/tests/test_import_loading_and_unloading_places.py +++ b/mobility_data/tests/test_import_loading_and_unloading_places.py @@ -57,3 +57,7 @@ def test_import(get_geojson_file_name_mock, municipalities): assert lantinen_rantakatu.extra["rajoitustyyppi"]["en"] == "Special area" assert lantinen_rantakatu.extra["paikkoja_y"] == 2 + assert lantinen_rantakatu.extra["max_aika_h"] == "3" + assert lantinen_rantakatu.extra["rajoitus_l"] == "test" + assert lantinen_rantakatu.extra["rajoitettu_ark"] == "4" + assert lantinen_rantakatu.extra["päiväys"] == "21.7.2022"