Skip to content

Conversation

@VillePihlava
Copy link
Contributor

@VillePihlava VillePihlava commented Sep 25, 2025

Summary

This PR adds the StreetDetailsService which is used for storing level and incline information for edges. A build config field is provided to enable/disable storing level and incline info. This PR also adds info about stairs, escalators, and elevators to the walksteps of a leg of the GTFS GraphQL API.

I also did some refactoring where I felt it was necessary, e.g. in EscalatorProcessor and OsmModule.

Issue

Closes #6829

Unit tests

New tests:

  • OsmModuleTest.java - a test related to storing incline/level information and a test related to the build config option
  • OsmWayTest.java - small changes to osm way testing
  • StatesToWalkStepsMapperTest.java - test related to escalators/stairs/elevators
  • GraphQLIntegrationTest.java - changing steps test by adding EscalatorUse and StairsUse

Documentation

  • Javadoc
  • Build config field summary

@VillePihlava VillePihlava changed the title Add OsmStreetDecoratorService for storing level and incline information for edges Add StreetDetailsService for storing level and incline information for edges Oct 27, 2025
Copy link
Member

@optionsome optionsome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you try adding GraphQL integration tests for the new features?

@VillePihlava
Copy link
Contributor Author

Could you try adding GraphQL integration tests for the new features?

done

Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably missed something, but I would like to know why half the features are created in the WalkStepMapper and the other half isn't.

Let's discuss in the dev meeting.

…into stairs-escalators-elevators-gtfs-graphql
if (verticalTransportationUse instanceof EscalatorUse escalatorUse) {
return escalatorUse;
} else if (verticalTransportationUse instanceof StairsUse stairsUse) {
return stairsUse;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could still use the switch here. On the other hand, are these ifs even necessary, could you just return verticalTransportationUse? The StepFeatureTypeResolver should handle the supported types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Bump Serialization Id Add this label if you want the serialization id automatically bumped after merging the PR HSL Helsinki Regional Transport Authority !New Feature A functional feature targeting the end user.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improved indoor navigation: Lifts, stairs and escalators

4 participants