Skip to content

Allow bicycles on ferries for Netex data - #3596

Merged
leonardehrenfried merged 14 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:enable-bicycles-on-ferries
Sep 7, 2021
Merged

Allow bicycles on ferries for Netex data#3596
leonardehrenfried merged 14 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:enable-bicycles-on-ferries

Conversation

@leonardehrenfried

@leonardehrenfried leonardehrenfried commented Sep 1, 2021

Copy link
Copy Markdown
Member

Summary

When importing Netex data, always allow bicycles to be taken onto ferries. This is useful because in Norway ferries are an important transport mode but the operators don't provide data in the Netex feeds if you're allowed to take the bike on. With very few exceptions however, you're allowed to do so.

What does it look like in the debug UI?

Screenshot from 2021-09-01 13-48-11

Reading the information from Netex

It was not clear to me how the bicycle conveyance information is actually supposed to be extracted from Netex as the schema is quite complex.

I was able to find the following references:

However in the current Norway-wide feed I cannot find an example of FareFrame or LuggageAllowance.

Is there an expert that I can ask where to extract this information from?

Issue

n/a

Tests

A test has been added.

Code style

Yes.

Documentation

I've commented the code with lots of explanations.

Changelog

@leonardehrenfried
leonardehrenfried requested a review from a team as a code owner September 1, 2021 15:26
@t2gran t2gran added this to the 2.1 milestone Sep 2, 2021
@leonardehrenfried

Copy link
Copy Markdown
Member Author

As requested I have added a parameter to the netex config so that you can exclude certain line ids from allowing bicycles on.

This however meant that most code in this PR is about this config param and the actual logic is quite small.

@t2gran t2gran added the !Improvement A functional improvement or micro feature label Sep 6, 2021
Comment thread docs/Netex-Norway.md Outdated
Comment thread docs/Changelog.md
Comment thread docs/examples/entur/build-config.json Outdated
Comment thread src/main/java/org/opentripplanner/netex/configure/NetexConfig.java Outdated
Comment thread src/main/java/org/opentripplanner/standalone/config/NodeAdapter.java Outdated
Comment thread src/main/java/org/opentripplanner/standalone/config/NodeAdapter.java Outdated

@t2gran t2gran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In general the implementation looks good,I have suggested a name change since I think the ferryWithoutBicycleIds is a bit confusing - bicycleIds or ferryIds.

@leonardehrenfried

Copy link
Copy Markdown
Member Author

The name is indeed confusing - I will change it. Thanks!

@leonardehrenfried
leonardehrenfried force-pushed the enable-bicycles-on-ferries branch from b25586b to ca5cce8 Compare September 6, 2021 12:49
@t2gran t2gran added the +NeTEx This issue is related to the Netex model/import. label Sep 7, 2021
Comment thread src/main/java/org/opentripplanner/netex/NetexBundle.java Outdated
Comment thread src/main/java/org/opentripplanner/netex/configure/NetexConfig.java Outdated
Comment thread src/main/java/org/opentripplanner/standalone/config/NetexConfig.java Outdated
Comment thread src/test/java/org/opentripplanner/standalone/config/NodeAdapterTest.java Outdated

@t2gran t2gran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good.

@leonardehrenfried

Copy link
Copy Markdown
Member Author

I just rebuild the Norway graph tested again - it works.

@leonardehrenfried
leonardehrenfried merged commit 1b3d841 into opentripplanner:dev-2.x Sep 7, 2021
@leonardehrenfried
leonardehrenfried deleted the enable-bicycles-on-ferries branch September 7, 2021 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Improvement A functional improvement or micro feature +NeTEx This issue is related to the Netex model/import.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants