GraphHopper.com | Forum | GitHub | Maps | Blog

Turning off smoothing completely


#1

I need to turn all line simplification off so I can merge
See two routes, same in both directions. I come a cropper on the straight bits as I guess douglas peucker works differently in either direction, well of course it does.
I can hunt these down but its messy, I will end up deleting roundabouts which I can handle but isnt ideal, but probably screw up eventually anyway, It would be much easier if I could ask it not to reduce anything.
my calls are these

/route?point=53.4164,-6.83345&point=53.3431,-7.04951&type=json&locale=en-GB&vehicle=car&weighting=fastest&optimise=false&elevation=false&index.highResolution=100&key=

/route?point=53.3431,-7.04951&point=53.4164,-6.83345&type=json&locale=en-GB&vehicle=car&weighting=fastest&optimise=false&elevation=false&index.highResolution=100&key=

I can dump some coloured JSON at you, but i assume this is clear, if I merge the results from those two I get a couple of roundabouts, no worries,. but on the straight bits i end up with different points and I will have to examine to remove. .


#2

I will try edge_id but I am thinking I am out of luck, the points went long ago, the coincident/duplicate sections I get are generally not at junction nodes, just on nice straight lines that DP rightly butchers, so I cant just de-dup on point to point.
If there isnt an api flag to do this I will have to look for lines that begin and end coincident with something else and remove. I have all the relevant info in store.


#3

Ive had a think about this and fighting it and hunting down the bits is futile.
I have managed to just hack out the douglas peucker stuff and return 0; needs a lot more ram but it runs and everything works.
I will raise an issue and ask if its worthwhile having an option to not simplify.