Skip to content

Read Via Way Restrictions - #2670

Closed
lukasalexanderweber wants to merge 3 commits into
graphhopper:masterfrom
lukasalexanderweber:read_via_way_restrictions
Closed

lukasalexanderweber wants to merge 3 commits into
graphhopper:masterfrom
lukasalexanderweber:read_via_way_restrictions

Conversation

@lukasalexanderweber

Copy link
Copy Markdown
Contributor

This one was already reviewed by @otbutz and @karussell in #2656, so I think this is ready to merge.

@easbar

easbar commented Oct 7, 2022

Copy link
Copy Markdown
Member

Thanks. I did not take a closer look, but the renaming makes reviewing a bit harder. I'm not 100% convinced that renaming OSMTurnRelation to OSMTurnRestriction is necessary (yes it is a turn restriction but it is also an OSM relation), but if you think it is usefuld and don't mind upgrading your branch I'll rename it in master so it is easier to see what changed here.

@easbar

easbar commented Oct 7, 2022

Copy link
Copy Markdown
Member

... or actually maybe you better revert the rename for now in your branch(es). If we do the rename I think we should also rename all the variables, so we do not have something like OSMTurnRestriction turnRelation = new OSMTurnRestriction() etc. I could do this in master, but then you will end up having all sorts of merge conflicts probably. And if you rename everything including the variables in your branches your changes will be hard to review. Therefore my suggestion for now: Revert this (anyway minor) renaming (easy to do with IntelliJ or Eclipse) and then we rename it afterwards.

@lukasalexanderweber

Copy link
Copy Markdown
Contributor Author

I could also edit the 7d474bc commit and update the variable names I missed (like OSMTurnRestriction turnRelation = new OSMTurnRestriction()).

I will later split the restrictions into node restrictions (restrictions with a via node) and way restrictions (restrictions with one or more via ways) and there node relation and way relation would be misleading. And I wouldn't like having turn relation and way restriction mixed up.

During review you can select the commits to look at. They are independent from each other. So you could ignore 7d474bc and only evaluate the other changes and I will look for variable names I missed.

Would this be fine for you?

@lukasalexanderweber

Copy link
Copy Markdown
Contributor Author

optionaly I delete 7d474bc and we'll do the renaming later

@easbar

easbar commented Oct 7, 2022

Copy link
Copy Markdown
Member

I did the renaming with all the variables in a separate branch here: ff48e2445fbf909f5e5457087a7d6ae0396747b0

Can you check if updating your code to this code is possible?

I will later split the restrictions into node restrictions (restrictions with a via node) and way restrictions (restrictions with one or more via ways) and there node relation and way relation would be misleading. And I wouldn't like having turn relation and way restriction mixed up.

Ok that makes sense, so we should indeed rename it now or later.

During review you can select the commits to look at. They are independent from each other. So you could ignore 7d474bc and only evaluate the other changes and I will look for variable names I missed.

Yeah, but keeping the commits separated like this doesn't work so well in my experience, especially because you will have to update to latest master, there will be back and forth changes during review and so on.

@easbar

easbar commented Oct 7, 2022

Copy link
Copy Markdown
Member

Can you check if updating your code to this code is possible?

I mean in theory. Don't put your time into actually doing this, because when we commit this to master the commit hash might be different again. If you think you can manage this I'll add this commit to master and then you could actually update your code.

@lukasalexanderweber

Copy link
Copy Markdown
Contributor Author

Yeah thank you! You can merge it into master and i'll update the code if its done 👍

@easbar

easbar commented Oct 7, 2022

Copy link
Copy Markdown
Member

I also moved OSMTurnRestriction.java into the osm package as you did. Not that it makes much sense that some classes like ReaderElement are in the reader package and the others are in reader/osm, but OSMTurnRestriction was even in another package than the corresponding test (probably the reason you moved it).

@lukasalexanderweber

Copy link
Copy Markdown
Contributor Author

@easbar I finally got a working copy: #2673

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.

2 participants