#dev 2020-10-28

2020-10-28 UTC
geoffo, nickodd, [fluffy], gRegorLove, kitt and KartikPrabhu joined the channel
[Emma_Humphries] and KartikPrabhu joined the channel; nickodd left the channel
[fluffy] joined the channel
geoffo and deltab joined the channel
#
GWG
I'm trying to solve my map drawing limitations by adding a polyline decoder. I'm still having trouble with line simplification.
#
GWG
The 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
I am working it from both sides.
#
GWG
The map generation code and the point query code
#
[schmarty]
Sounds like more than one issue 😂
geoffo joined the channel
#
GWG
[schmarty]: Fortunately, I'm not flying anywhere soon, but I have plenty of historic data I can add in
#
GWG
I 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
#
aaronpk
whatever 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
#
aaronpk
the 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
#
aaronpk
regardless whether the line spans continents or blocks
#
[schmarty]
Sweet. Haha, I figured you'd just know aaronpk 😂
#
aaronpk
oh right i had to do that one manually cause the code can't cross the date line that direction
#
aaronpk
the next map challenge for me is to figure out a smoothing or snapping algorithm to get rid of the jaggies on things like this https://aaronparecki.com/2019/09/21/13/map.png
#
GWG
aaronpk: I implemented the algorithm, just haven't figured out the tolerance
#
GWG
If you set it wrong, you get just two points
#
GWG
I've been playing with the feature for days
#
GWG
The encoded polyline to deal with URL limitations took a bit
#
GWG
I need to finish that work, I am modifying your old code, aaronpk
#
GWG
I don't need the full Atlas suite, though maybe I should do a PR to it.
[grantcodes] joined the channel
#
[grantcodes]
Are you using geojson @GWG? I have found many map tools are set up to render that with lots of points on it.
#
GWG
[grantcodes]: I'm using a modded version of aaronpk's Static Map script
#
Loqi
[dshanske] Static-Maps-API-PHP: A PHP app that renders static maps from tile hosting services
#
aaronpk
whoa my last commit there is from 2014
#
GWG
aaronpk: You rolled it into Atlas
#
GWG
I backported some of your Atlas improvements
#
GWG
And added some of my own
fauno_ joined the channel
#
GWG
I have some other ideas for my fork, like generating text on the map.
gRegorLove, geoffo, [fluffy], deathrow1, [schmarty], [tantek], dopplergange, [Ana_Rodrigues], maxwelljoslyn, KartikPrabhu, dopplerg-, ArjunAa, [chrisbergr], shakeel, timotimo and [KevinMarks] joined the channel
#
jacky
I've been hacking away on my micropub client
#
jacky
and I realize that attempting to rebuild the tumblr editor is borderline nuts lol
#
jacky
just replace algorithmicalexpansion with a blog you own
#
jacky
this is the most 'advanced' view https://i.imgur.com/ofZTk9H.png