I have in my possession four sets of shapefiles:
1. Locations (points), around 1000
2. Roads (lines), each road has a speed attribute
3. Terrain (polygons), each zone also has a speed attribute
4. Rivers (lines), each river has a crossing delay time attribute

How can I construct a Voronoi diagram for my location using travel time as a distance metric? I could have used pgRouting if I had roads only, but I am not sure how to approach different off-road terrain and rivers. I'm willing to code this, but I've spent enough time trying to come up with an algorithm, but to no avail.

My current plan is to dump it all into a sufficiently large raster and create 1000 distance maps out of it, then use them to calculate the Voronoi cells, but I have a suspicion that a sufficiently large raster will take too long to process. Is there a better vector-based algorithm?

  • 2
    I describe an extremely efficient solution in a recently awarded patent viewable at google.com/patents/….
    – whuber
    Jun 24, 2013 at 16:43
  • @whuber Oh, interesting. It seems you're also rasterizing the region. I am not sure if I can use a patented algorithm, though.
    – Alexey
    Jun 25, 2013 at 9:55
  • 1
    @dassouki That's not how patents work :-(. You have to demonstrate priority and exclusiveness, which means you can't publish beforehand. I do have presentation slides, though: look for the "raster-vector hybrids" section at the end (part 4, pp 37-45 inclusive). To fully appreciate slide 38 ("Why not put the two together?"), though, you should look at the first three parts :-).
    – whuber
    Jun 25, 2013 at 13:35
  • 1
    It appears that Whuber answered this question as a comment. @whuber please consider adding your comment as an answer.
    – kttii
    Oct 17, 2016 at 16:16
  • 1
    @kttii Thank you for reminding me of this thread. I only gave a reference: that doesn't qualify as an answer. Someday if I get the time I'll see about providing an actual answer.
    – whuber
    Oct 17, 2016 at 17:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.