Skip to content

Commit

Permalink
Rework crossing question (#242)
Browse files Browse the repository at this point in the history
* Split crossing questions into multiple ones
* Add images for crossings and delete obsolet ones
* Extend question for cycleway, footway, path, railway
* Add, update, rearrange crossing map features
* Remove OpenWay from questions with highway/railway=crossing/tram_crossing
  • Loading branch information
7h30n3 authored Mar 1, 2024
1 parent ad90856 commit ac4c12b
Show file tree
Hide file tree
Showing 20 changed files with 944 additions and 95 deletions.
832 changes: 787 additions & 45 deletions assets/question_catalog/definition.json

Large diffs are not rendered by default.

Binary file removed assets/question_catalog/images/crossing_marked.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed assets/question_catalog/images/crossing_unmarked.png
Binary file not shown.
Binary file removed assets/question_catalog/images/crossing_zebra.png
Binary file not shown.
106 changes: 78 additions & 28 deletions assets/question_catalog/locales/en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -422,20 +422,70 @@
"@escalatorDurationText": {},
"escalatorDurationDescription": "A moving sidewalk (also known as autowalk, moving pavement, people-mover or travelator) transports people across a horizontal or inclined plane. An escalator is a moving stairway to carry people between floors of a building. The duration of the escalator journey is relevant for the calculation of transfer times.",
"@escalatorDurationDescription": {},
"crosswalkTypeName": "Crosswalk type",
"@crosswalkTypeName": {},
"crosswalkTypeText": "What kind of pedestrian crossing is this?",
"@crosswalkTypeText": {},
"crosswalkTypeDescription": "If several answers apply, the one that is superior in terms of traffic must be selected. For example, if there are pedestrian lights with a zebra crossing, select the pedestrian lights.",
"@crosswalkTypeDescription": {},
"crosswalkTypePedestrianOption": "Pedestrian lights",
"@crosswalkTypePedestrianOption": {},
"crosswalkTypeZebraOption": "Zebra crossing",
"@crosswalkTypeZebraOption": {},
"crosswalkTypeMarkedOption": "Marked crossing",
"@crosswalkTypeMarkedOption": {},
"crosswalkTypeUnmarkedOption": "Unmarked crossing",
"@crosswalkTypeUnmarkedOption": {},
"crossingSignalsName": "Crossing signals",
"@crossingSignalsName": {},
"crossingSignalsText": "Are there pedestrian lights at this crossing?",
"@crossingSignalsText": {},
"crossingSignalsDescription": "Indicates whether a crossing is controlled by a pedstrian light.",
"@crossingSignalsDescription": {},
"crossingMarkingsName": "Crossing markings",
"@crossingMarkingsName": {},
"crossingMarkingsText": "Are there markings at this crossing?",
"@crossingMarkingsText": {},
"crossingMarkingsDescription": "Markings on the ground are meant to draw attention to the area where pedestrians cross the road.",
"@crossingMarkingsDescription": {},
"crossingMarkingsNoneOption": "None",
"@crossingMarkingsNoneOption": {},
"crossingMarkingsFootwayOption": "Only footway",
"@crossingMarkingsFootwayOption": {},
"crossingMarkingsCyclewayOption": "Only cycleway",
"@crossingMarkingsCyclewayOption": {},
"crossingMarkingsSharedOption": "Shared marking for cycleway and footway",
"@crossingMarkingsSharedOption": {},
"crossingMarkingsSeparateOption": "Separate markings for cycleway and footway",
"@crossingMarkingsSeparateOption": {},
"crossingFootwayMarkingsName": "Footway crossing markings",
"@crossingFootwayMarkingsName": {},
"crossingFootwayMarkingsText": "Are there markings at this footway crossing?",
"@crossingFootwayMarkingsText": {},
"crossingCyclewayMarkingsName": "Cycleway crossing markings",
"@crossingCyclewayMarkingsName": {},
"crossingCyclewayMarkingsText": "Are there markings at this cycleway crossing?",
"@crossingCyclewayMarkingsText": {},
"crossingMarkingsTypeName": "Crossing markings type",
"@crossingMarkingsTypeName": {},
"crossingMarkingsTypeText": "Which type of markings are at this crossing?",
"@crossingMarkingsTypeText": {},
"crossingMarkingsTypeDescription": "Select the crossing markings that fit best.",
"@crossingMarkingsTypeDescription": {},
"crossingCyclewayMarkingsTypeName": "Cycleway crossing markings type",
"@crossingCyclewayMarkingsTypeName": {},
"crossingCyclewayMarkingsTypeText": "Which type of markings are at this cycleway crossing?",
"@crossingCyclewayMarkingsTypeText": {},
"crossingFootwayMarkingsTypeName": "Footway crossing markings type",
"@crossingFootwayMarkingsTypeName": {},
"crossingFootwayMarkingsTypeText": "Which type of markings are at this footway crossing?",
"@crossingFootwayMarkingsTypeText": {},
"crossingMarkingsTypeZebraOption": "Zebra",
"@crossingMarkingsTypeZebraOption": {},
"crossingMarkingsTypeLinesOption": "Lines",
"@crossingMarkingsTypeLinesOption": {},
"crossingMarkingsTypeLadderOption": "Ladder",
"@crossingMarkingsTypeLadderOption": {},
"crossingMarkingsTypeDashesOption": "Dashes",
"@crossingMarkingsTypeDashesOption": {},
"crossingMarkingsTypeDotsOption": "Dots",
"@crossingMarkingsTypeDotsOption": {},
"crossingMarkingsTypeSurfaceOption": "Surface",
"@crossingMarkingsTypeSurfaceOption": {},
"crossingMarkingsTypePictogramsOption": "Pictograms",
"@crossingMarkingsTypePictogramsOption": {},
"crossingIslandName": "Pedestrian island",
"@crossingIslandName": {},
"crossingIslandText": "Is there a pedestrian island at this crossing?",
"@crossingIslandText": {},
"crossingIslandDescription": "The pedestrian island is also called refuge island or traffic island.",
"@crossingIslandDescription": {},
"pedestrianLightsButtonName": "Pedestrian lights button",
"@pedestrianLightsButtonName": {},
"pedestrianLightsButtonText": "Do the pedestrian lights have a request button?",
Expand Down Expand Up @@ -498,20 +548,20 @@
"@tactilePavingText": {},
"tactilePavingDescription": "Tactile pavings are ground elements in public spaces providing information, orientation, guidance and warning for visually impaired people. They stand in high tactile, visual and possibly acoustic contrast to the adjacent floor covering.",
"@tactilePavingDescription": {},
"crosswalkBarrierName": "Crosswalk barrier",
"@crosswalkBarrierName": {},
"crosswalkBarrierText": "How is this railroad crossing secured for pedestrians?",
"@crosswalkBarrierText": {},
"crosswalkBarrierOption": "Barrier",
"@crosswalkBarrierOption": {},
"crosswalkBarrierChicaneOption": "Chicane",
"@crosswalkBarrierChicaneOption": {},
"crosswalkBarrierGateOption": "Gate",
"@crosswalkBarrierGateOption": {},
"crosswalkBarrierChainOption": "Chain",
"@crosswalkBarrierChainOption": {},
"crosswalkBarrierUnsecuredOption": "Unsecured",
"@crosswalkBarrierUnsecuredOption": {},
"crossingBarrierName": "Crossing barrier",
"@crossingBarrierName": {},
"crossingBarrierText": "How is this railroad crossing secured for pedestrians?",
"@crossingBarrierText": {},
"crossingBarrierOption": "Barrier",
"@crossingBarrierOption": {},
"crossingBarrierChicaneOption": "Chicane",
"@crossingBarrierChicaneOption": {},
"crossingBarrierGateOption": "Gate",
"@crossingBarrierGateOption": {},
"crossingBarrierChainOption": "Chain",
"@crossingBarrierChainOption": {},
"crossingBarrierUnsecuredOption": "Unsecured",
"@crossingBarrierUnsecuredOption": {},
"railroadChicaneName": "Railroad chicane",
"@railroadChicaneName": {},
"railroadChicaneText": "Is there a pedestrian chicane at this railroad crossing?",
Expand Down
12 changes: 8 additions & 4 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,20 @@
"@mapFeatureEscalator": {},
"mapFeatureCycleBarrier": "Cycle barrier",
"@mapFeatureCycleBarrier": {},
"mapFeatureCrosswalk": "Crosswalk",
"@mapFeatureCrosswalk": {},
"mapFeaturePedestrianLights": "Pedestrian lights",
"@mapFeaturePedestrianLights": {},
"mapFeatureCrossing": "Crossing",
"@mapFeatureCrossing": {},
"mapFeatureTramCrossing": "Tram crossing",
"@mapFeatureTramCrossing": {},
"mapFeatureRailroadCrossing": "Railroad crossing",
"@mapFeatureRailroadCrossing": {},
"mapFeatureFootwayCrossing": "Footway crossing",
"@mapFeatureFootwayCrossing": {},
"mapFeatureCyclewayCrossing": "Cycleway crossing",
"@mapFeatureCyclewayCrossing": {},
"mapFeatureCurb": "Curb",
"@mapFeatureCurb": {},
"mapFeaturePedestrianLights": "Pedestrian lights",
"@mapFeaturePedestrianLights": {},
"mapFeatureBusPlatformNumber": "Platform: {number}",
"@mapFeatureBusPlatformNumber": {
"placeholders": {
Expand Down
89 changes: 71 additions & 18 deletions lib/models/map_features/map_features.dart
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ final _globalDefinitions = <MapFeatureDefinition>[
],
),
MapFeatureDefinition(
label: (locale, _) => locale.mapFeatureCrosswalk,
icon: TemakiIcons.pedestrianCrosswalk,
label: (locale, _) => locale.mapFeatureCrossing,
icon: TemakiIcons.pedCyclistCrosswalk,
conditions: const [
ElementCondition([
TagsSubCondition({
Expand All @@ -576,46 +576,79 @@ final _globalDefinitions = <MapFeatureDefinition>[
],
),
MapFeatureDefinition(
label: (locale, _) => locale.mapFeaturePedestrianLights,
icon: TemakiIcons.trafficSignals,
label: (locale, _) => locale.mapFeatureTramCrossing,
icon: TemakiIcons.crossingTramSolid,
conditions: const [
ElementCondition([
TagsSubCondition({
'highway': StringValueMatcher('crossing'),
'crossing': StringValueMatcher('traffic_signals'),
'railway': StringValueMatcher('tram_crossing'),
}),
ElementTypeSubCondition([OSMElementType.node, OSMElementType.openWay])
ElementTypeSubCondition([OSMElementType.node])
]),
],
),
MapFeatureDefinition(
label: (locale, _) => locale.mapFeatureRailroadCrossing,
icon: TemakiIcons.crossingRailSolid,
conditions: const [
ElementCondition([
TagsSubCondition({
'highway': StringValueMatcher('crossing'),
'crossing:signals': StringValueMatcher('yes'),
'railway': StringValueMatcher('crossing'),
}),
ElementTypeSubCondition([OSMElementType.node, OSMElementType.openWay])
ElementTypeSubCondition([OSMElementType.node])
]),
],
),
MapFeatureDefinition(
label: (locale, _) => locale.mapFeatureTramCrossing,
icon: TemakiIcons.crossingTramSolid,
label: (locale, _) => locale.mapFeatureFootwayCrossing,
icon: TemakiIcons.pedestrianCrosswalk,
conditions: const [
ElementCondition([
TagsSubCondition({
'railway': StringValueMatcher('tram_crossing'),
'highway': StringValueMatcher('footway'),
'footway': StringValueMatcher('crossing'),
}),
]),
ElementCondition([
TagsSubCondition({
'highway': StringValueMatcher('path'),
'path': StringValueMatcher('crossing'),
'foot': MultiValueMatcher([
StringValueMatcher('yes'),
StringValueMatcher('designated'),
]),
'bicycle': MultiValueMatcher([
EmptyValueMatcher(),
StringValueMatcher('no'),
]),
}),
ElementTypeSubCondition([OSMElementType.node])
]),
],
),
MapFeatureDefinition(
label: (locale, _) => locale.mapFeatureRailroadCrossing,
icon: TemakiIcons.crossingRailSolid,
label: (locale, _) => locale.mapFeatureCyclewayCrossing,
icon: TemakiIcons.cyclistCrosswalk,
conditions: const [
ElementCondition([
TagsSubCondition({
'railway': StringValueMatcher('crossing'),
'highway': StringValueMatcher('cycleway'),
'cycleway': StringValueMatcher('crossing'),
}),
ElementTypeSubCondition([OSMElementType.node])
]),
ElementCondition([
TagsSubCondition({
'highway': StringValueMatcher('path'),
'path': StringValueMatcher('crossing'),
'bicycle': MultiValueMatcher([
StringValueMatcher('yes'),
StringValueMatcher('designated'),
]),
'foot': MultiValueMatcher([
EmptyValueMatcher(),
StringValueMatcher('no'),
]),
}),
ElementTypeSubCondition([OSMElementType.openWay])
]),
],
),
Expand All @@ -631,4 +664,24 @@ final _globalDefinitions = <MapFeatureDefinition>[
]),
],
),
MapFeatureDefinition(
label: (locale, _) => locale.mapFeaturePedestrianLights,
icon: TemakiIcons.trafficSignals,
conditions: const [
ElementCondition([
TagsSubCondition({
'highway': StringValueMatcher('crossing'),
'crossing': StringValueMatcher('traffic_signals'),
}),
ElementTypeSubCondition([OSMElementType.node, OSMElementType.openWay])
]),
ElementCondition([
TagsSubCondition({
'highway': StringValueMatcher('crossing'),
'crossing:signals': StringValueMatcher('yes'),
}),
ElementTypeSubCondition([OSMElementType.node, OSMElementType.openWay])
]),
],
),
];

0 comments on commit ac4c12b

Please sign in to comment.