News for hackers. Stuff that matters.
Re:A new kind of map: it’s about time by microcolonel on Wednesday September 20, 2017 @11:40AM (#15294993)
For what it's worth, I think it would be computationally quite hard. You would have to pick a set of points and maybe isomap them from three dimensions (x, y, and time) to two, then find a visually acceptable cage transformation using those points as anchors. You'd have to do this for each query.
Re:A new kind of map: it’s about time by qznc on Wednesday September 20, 2017 @11:49AM (#15295081)
The Isochrones [0] mentioned in the article include basically all the necessary information. I guess a capable GPU-shader programmer could easily render the distortion in real time. (Hint Hint Hacker News for a cool weekend project)

[0] https://www.mapbox.com/bites/00156/#10/51.6840/-0.1480

Re:A new kind of map: it’s about time by nemetroid on Wednesday September 20, 2017 @11:57AM (#15295207)
The problem isn't in getting the data for the transformation but to figure out which transformation to use. It's not possible to do in the general case, imagine e.g. an infinitely quick circle line. Where do you put the part of the map that's inside the circle?
Re:A new kind of map: it’s about time by TFortunato on Wednesday September 20, 2017 @12:33PM (#15295642)
I think as far as figuring out the transformation to use on the a generic map I would:

0) ignore stuff like "infinitely quick" since that isn't realistic for what we are doing :-)

1) For the map I am displaying, pick a handful of points of interest to hse as controls, as well as my current location.

2) Use existing data we already have for stuff like direction routing to get travel times between all the pairs in our points of interest.

3) Draw a weighted graph, where each vertex is one of our points of interest and each edge is weighted by travel time. The initial position of each point should be it's geographic position, but we can then use an existing graph layout algorithm that uses an energy-based method (e.g. pretend the edges are springs) to deform the graph. This way each point will end up with its distance being proportional to travel time.

4) Using initial points as our input control points, and their location in the graph as output cobtrol points, use any number of image warping algorithms put there to calculate our warp / morph / deformation field.

5) Apply to initial map image.

I don't know how well it would work in practice but seems like a reasonable first stab at it! :-)

EDIT: Apologies for typo, fat fingers on mobile!

Re:A new kind of map: it’s about time by ballenarosada on Wednesday September 20, 2017 @03:19PM (#15297264)
There's no reason your distance graph should correspond to any continuous mapping of the plane. Two distances constrain a third point to one of two spots. Add a third distance and unless you get lucky, there will be no valid corresponding point in the codomain.
Re:A new kind of map: it’s about time by TFortunato on Wednesday September 20, 2017 @06:01PM (#15298731)
That is absolutely true, and I fully admit that there isn't going to be a perfect way to do this unless you are very lucky. I'm only curious if you could use a method like this to make maps like shown above at http://www.spiekermann-wegener.com/mod/time/time_e.htm where it's approximately correct in a somewhat useful way.

My gut says it's probably more realistic to do this for large scale maps (say between major cities, 100s of miles, where distance is pretty proportional to travel time). Once you get down to the city / street level, yeah it probably gets real dicey with high variation in travel speeds depending on the particular road and how routes are laid out, and you just aren't going to get pretty triangles fitting together nicely :-P.

In any case its a fun problem to think about!

Re:A new kind of map: it’s about time by qznc on Wednesday September 20, 2017 @12:33PM (#15295639)
Good point.

An infinitely quick circle would reduce to a point. Morphing a 2D map in 3D, I would imagine the inside of the circle like a balloon with the circle as the opening. Reducing that to 2D seems impossible without breaking it somehow.

I guess the problem is worth at least a paper, if not a dissertation. Maybe there is some esoteric math paper in topology which already solved that? Or has proven it impossible?

Re:A new kind of map: it’s about time by toomuchtodo on Wednesday September 20, 2017 @12:06PM (#15295311)
> (Hint Hint Hacker News for a cool weekend project)

I would love an HN/GoFundMe or Patreon mashup, where people could take on cool hacks in a thread that readers are willing to support.

I have zero free time at this point in my life, but would be willing to throw some money at folks who do have free time and skills.

Re:A new kind of map: it’s about time by ximeng on Thursday September 21, 2017 @04:52AM (#15301632)
If you are serious you could include some contact details in your profile and a statement for the kind of projects you're interested in funding.
Re:A new kind of map: it’s about time by microcolonel on Wednesday September 20, 2017 @12:45PM (#15295771)
That looks pretty good! It seems like the transformation could be done reasonably quickly, maybe with a two-component texture (not sure how efficient texture sampling in vertex shaders is), in the vertex shader(s) in that Mapbox GL instance right after the basic projection. I might give this a go. It might get a bit weird around the edges though, gotta make sure to have a margin of additional geometry.
Re:A new kind of map: it’s about time by nhaehnle on Wednesday September 20, 2017 @04:50PM (#15298121)
> not sure how efficient texture sampling in vertex shaders is

On a modern GPU, it's basically just as efficient as in pixel shaders, with two caveats:

1. If you want mip-mapping, you have to do LOD calculations yourself, which is likely a bit slower. (Not an issue in what you have in mind.)

2. There are questions around the locality of your memory accesses. As long as you lay out your vertices more or less along a space-filling curve (which is a good idea for grids anyway, due to vertex reuse) you should be mostly fine. Obviously the details will vary depending on the exact architecture.

Re:A new kind of map: it’s about time by nkoren on Wednesday September 20, 2017 @12:49PM (#15295827)
I suspect it would be relatively straightforward. Treat each datapoint as origin of a voronoi cell, in both realspace and travel-timespace. This would give you appropriate cage boundaries on both maps, and the transformation between them should be easy.
Re:A new kind of map: it’s about time by ctdonath on Wednesday September 20, 2017 @11:46AM (#15295049)
Alternative would be to keep the standard geographic map, but have clear points on all possible destinations X minutes away - ideally with a slider, watching the "X minutes" points slide around. Actually pretty easy, given each road segment knowing expected speed, and "X+1" just extending into untraveled areas.
Re:A new kind of map: it’s about time by jamessb on Wednesday September 20, 2017 @12:15PM (#15295429)
There are many interactive isochrone maps with sliders - one such example is [1]. Other isochrone maps listed here [2] may also have time sliders.

[1]: http://property.mapumental.com

[2]: https://wiki.openstreetmap.org/wiki/Isochrone#Examples

Re:A new kind of map: it’s about time by ctdonath on Wednesday September 20, 2017 @01:31PM (#15296231)
They're all public transit. I'm looking for general roads, re: "I'm here, where can I drive to in 35 minutes?"
Re:A new kind of map: it’s about time by lemonlyman516 on Wednesday September 20, 2017 @03:18PM (#15297254)
Mapbox actually has this! Peter, the author, shared our github plugin to generate isochrones in your browser. https://blog.mapbox.com/add-isochrones-to-your-next-applicat...
Re:A new kind of map: it’s about time by ctdonath on Wednesday September 20, 2017 @05:00PM (#15298200)
The demo of that is staggeringly awesome. Thank you.
Re:A new kind of map: it’s about time by dredmorbius on Wednesday September 20, 2017 @09:39PM (#15299933)
See Cartograms.