Repository navigation
Only update the location if it was empty - #1492
efranqueiro wants to merge 3 commits into
Conversation
|
The assumption is that init overwrites all local variables. So instead of changing this, we should better document that init should be called before calling setGraphHopperLocation (or break API at some point and implement a builder pattern). Would this help in your case too? |
|
For my specific case, I can use This works These don't We could be to force |
|
Yes, too ugly. We probably need a breaking change here to make this clean. And use this chance to reduce the code line count in the GraphHopper class :) What would you propose? Something like a separate configuration object? |
|
A config object with sane defaults when possible, and some sort of validation, seems like a sensible solution to me. Same with a builder. |
|
Just a note - if you are going to make a Builder for graphhopper, just remember about their subclasses - maybe it is a good moment to prefer composition over inheritance (for data readers for example)? IMO this Builder should be generic and return given subclass to allow Inheritance also. |
Yes, this would be another goal and related to #1370
Isn't this the opposite of what you requested? |
Yeah, I am aware of it, but there is a need (as I think) for extending functionality of gh over
I think second option will be easier (also in use-some kind of API) and maybe cleaner, but it requires Inheritance - users will get some prepared base and add what their want. It is better than current solution, because now you can't just add your functionality ahead of graph processing (from shp/pbf etc). Those are just a quick thoughts so... |
|
Will be done via #1895. |
No description provided.