slide
slide copied to clipboard
How do *I* help this project get to the latest version of iD?
I want to help here. I think Slide is an invaluable tool for the world. I cant believe no one else besides @paulmach is involved - and maybe even paul has dropped it for other work. Id like to help. What are some of the meta steps I can do in order to go and run this on my own server and integrate it in with a newer version of iD? Where should I host it? Where did the current iD example host? Just looking for a paragraph answer to point me in right direction...Thanks!
Hi Nick,
The slide that most people use is hosted by my former employer (strava). It uses the code here plus the global heatmap data to build the results. The raw global heatmap data is not available publicly so hosting your own slide does not really make sense unless you have a similar dataset you'd like to try it on. If you do, I can help with that.
But, anyone can use the HTTP/JSON api provided by strava (with attribution). So to solve the problem of making it work with newer versions of iD, one would just need to integrate it with the newer code. The code for the iD editor at http://strava.github.io/iD is found at https://github.com/strava/iD and you can look at the last few commits to see what was done to add it.
Recently iD was bumped to 2.0 and they refactored a bunch of stuff into javascript modules and stuff so it'll take a bit of work fit it in, but I'd imagine the core concept would stay the same.
So, if the issue is upgrading the http://strava.github.io/iD to use iD 2.0+ I can look into getting access to that repo again and looking into how much work it'll be.
cc @mlerner
If anybody have the knowhow to transform the code into a JOSM Plugin, using Java and Strava's Java bindings, or some way convert the bindings in this repo, I know many OSM contributors using the JOSM editor will be very happy.
@paulmach I have just started looking at some of this. I have yet to sit down and build a local iD instance or such... Simply looking at the code and your commits mentioned above to understand the big picture.
So, question, is the actual "sliding" calculations and such happening on server side somewhere over at Strava labs? I had thought this was done locally by browser, but now I see two completely seperate code bases in your slide repo and iD fork. So where is the go code being run?
Thanks!
The work is split between the server and the browser. The server takes a linestring and returns a smoothed linestring. The js/browser figures out what polyline to send and how exactly to merge it back into osm.
The reason there is a server side component is because the "raw heatmap data" ie. the actual counts, not the raster png data, can not be shared. This was a requirement made by those above me when I was at strava. I did not want to push the issue because initially they were very reluctant to even release the heatmap at all.
As a result the code in this repo is kind of crippled. I tried to use the same algorithm with the TIGER data, but it was never as useful as using the strava data.
The server side code currently used at strava.github.io/iD is accessible at https://gometry.strava.com/slide and hosted by Strava. Unless Strava says otherwise this same endpoint can be used in a new version of iD or in JSOM.
Oh, and to get started at running the Strava iD fork you'll need to do two things:
- get it to build and run, just tried the install section from the readme and it worked for me https://github.com/strava/iD#installation
- make sure the right slide endpoint is being used, see https://github.com/strava/iD/blob/master/js/id/operations/slide.js#L2 Since you wont have slide running locally it should just be
var slideOperationURI = "https://gometry.strava.com/slide";
I don't know what the steps would be to upgrade/rebase the iD code to the 2.X version.