Skip to content

Make way-geometry store customizable in subclasses - #507

Closed
jtheuer wants to merge 5 commits into
graphhopper:masterfrom
KomootArchive:master
Closed

jtheuer wants to merge 5 commits into
graphhopper:masterfrom
KomootArchive:master

Conversation

@jtheuer

@jtheuer jtheuer commented Aug 25, 2015

Copy link
Copy Markdown

No description provided.

@karussell

Copy link
Copy Markdown
Member

Maybe the better way of doing it would be to define a more generic PointList modification interface? Which is currently DouglasPeucker and could be used for smoothing and more.

@jtheuer

jtheuer commented Aug 25, 2015

Copy link
Copy Markdown
Author

Sure, if you prefer a more generic solution.

@karussell

Copy link
Copy Markdown
Member

With extending DouglasPeucker it should be already doable what you want (?)
although not soo nice as with a more generic PointListModificator interface

@jtheuer

jtheuer commented Aug 25, 2015

Copy link
Copy Markdown
Author

Looking deeper at the problem it would also be nice to have the full geometry, not only the pillarnodes.

Of course you can't change the tower coordinates but the for simplification and other enhancements it is always better to have the first and last coordinate, too.

@karussell

Copy link
Copy Markdown
Member

Yes, indeed.

@jtheuer

jtheuer commented Sep 15, 2015

Copy link
Copy Markdown
Author

Another possibility that is less invasive would be to change the modifier of

EdgeIteratorState addEdge( int fromIndex, int toIndex, PointList pointList, long flags, long wayOsmId )

to protected this would follow the pattern you use for getElevation and would also allow me to perform the necessary modifications of the PointList. What do you think?

@karussell

Copy link
Copy Markdown
Member

Hmmh, what about the following?

If we move

if (doSimplify) simplifyAlgo.simplify(nodes);

into a method - e.g. protected PointList filterNodes(PointList) - and call this method with the full nodes (pointList) before the "pillarNodes-creation" loop, then the simplify algorithm would improve too and your requirements are fullfilled.

@jtheuer

jtheuer commented Sep 15, 2015

Copy link
Copy Markdown
Author

Sounds great!

karussell pushed a commit that referenced this pull request Sep 15, 2015
@karussell

Copy link
Copy Markdown
Member

I've implemented a sketch for this, but several integration tests are failing and I'm unsure why the algorithm is effected (visited nodes mismatch in GraphHopperIT.executeCHFootRoute), but won't have time to investigate this in the next days.

@karussell karussell closed this Jul 25, 2017
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