Skip to content

Platform entries linking - #2428

Merged
novalis merged 4 commits into
opentripplanner:masterfrom
entur:rutebanken_link_osm_steps_to_platform
Jun 28, 2017
Merged

Platform entries linking#2428
novalis merged 4 commits into
opentripplanner:masterfrom
entur:rutebanken_link_osm_steps_to_platform

Conversation

@fredinge

Copy link
Copy Markdown
Contributor

This PR implements a solution for #2422.

It links the entries inside the platform area to the platform by creating new edges between the entry's end vertex and the vertices in the ring defining the platform area. OTP will then be able to do routing through the platforms fairly accurate. The feature can be enabled in the build config file.

double[] testPointInside = { 59.8926474, 10.524729};
double[] testPointOutside = { 59.8925344, 10.5249007};

assert(PlatformLinker.contains(platform, testPointInside));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I would prefer to use the junit assertion functions.

Vertex in = gv;
if (!(e instanceof StreetEdge || e instanceof StreetTransitLink ||
e instanceof ElevatorEdge || e instanceof FreeEdge)) {
e instanceof ElevatorEdge || e instanceof FreeEdge || e instanceof PathwayEdge)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This commit adds this but the next one removes it. Which do you really want?

private void linkPlatformEntries() {
PlatformLinker platformLinker = new PlatformLinker(graph, osmdb);
platformLinker.linkEntriesToPlatforms();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: remove this blank line

@novalis

novalis commented May 1, 2017

Copy link
Copy Markdown
Contributor

Can you provide an integration test here?

@fredinge

Copy link
Copy Markdown
Contributor Author

Added integration test

@seime

seime commented Jun 27, 2017

Copy link
Copy Markdown
Contributor

@novalis Building seems to have failed due to travis - not the code itself. Could you kick it off again?

@novalis

novalis commented Jun 27, 2017

Copy link
Copy Markdown
Contributor

I think you'll need to rebase -- IIRC, that error was fixed later on in master.

@novalis
novalis merged commit e2d6f5b into opentripplanner:master Jun 28, 2017
@demory demory mentioned this pull request Aug 16, 2017
@t2gran
t2gran deleted the rutebanken_link_osm_steps_to_platform branch May 6, 2020 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants