#GWGI'm trying to solve my map drawing limitations by adding a polyline decoder. I'm still having trouble with line simplification.
#GWGThe algorithm for line simplification calls for a tolerance number and I am not sure what formula to use to calculate it based on my series of points
[schmarty] joined the channel
#[schmarty]GWG sounds like tolerance would be more dependent on the resolution of the output image
geoffo joined the channel
#GWG[schmarty]: My issue is that I have a maximum cap of points, and I need a formula that can work for a transatlantic flight or a walk around the block
#GWG[schmarty]: Fortunately, I'm not flying anywhere soon, but I have plenty of historic data I can add in
#GWGI am thinking of allowing the pasting in of an encoded polyline as the UI, or querying compass, but I need to sanitize it before it goes to map generation
#[schmarty]aaronpk probably has a lot more insight into this but I think you'll have to take an iterative approach
#aaronpkwhatever i did a while ago has been working great
#[schmarty]At the very least I figure you'd want to know the distance between the two furthest points and how those map to your expected final image. That would let you iterate over all the points and filter out any that aren't "far enough" from the last point to be visible
#aaronpkthe ramer douglas peucker simplification has been good enough for all the maps on my site
#[schmarty]If you have a maximum points budget then you'll want to do some kind of iterative simplification algorithm
#aaronpkregardless whether the line spans continents or blocks
#[schmarty]Sweet. Haha, I figured you'd just know aaronpk 😂