[OSM-dev] shortestpathtree.org - a tool for quickly checking OSM data integrity

18 views
Skip to first unread message

Brandon Martin-Anderson

unread,
Mar 12, 2012, 12:11:35 PM3/12/12
to osm-dev, geowa...@geowanking.org
Behold! I made a thing.

http://shortestpathtree.org

It creates shortest path trees, which are pretty, and have a variety
of uses. My favorite use is quickly and phenomenologically checking
OSM referential integrity across entire cities. Also, potentially, it
can tell you how to get places. Tell me how you like it.

Colophon, for the interested:
Server and client-side code is at https://github.com/bmander/vtp. I
took Migurski's city extracts in PBF format and popped them into a
Mongodb instance using a homebrew script in node.js. Then I applied a
series of map-reduce runs to slice the ways at shared intersections,
and to collect them into tiles. This is slow, but there's some home of
parallelization. A simple node.js script serves the vector tiles to
the client, where all routing is done; printed to a homebrew
canvas-based client. The disadvantage is that routing is slow for you.
The advantage is the server doesn't have to do anything except hand
out tiles, which, ideally, should be pretty small.

-B

_______________________________________________
dev mailing list
d...@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Josh Doe

unread,
Mar 12, 2012, 12:20:15 PM3/12/12
to Brandon Martin-Anderson, osm-dev
On Mon, Mar 12, 2012 at 12:11 PM, Brandon Martin-Anderson
<bad...@gmail.com> wrote:
> Behold! I made a thing.
>
> http://shortestpathtree.org

Very cool! I'll have to generate this for my region (Washington DC).
It's mesmerizing!
-Josh

Laurence Penney

unread,
Mar 12, 2012, 12:42:11 PM3/12/12
to Brandon Martin-Anderson, osm-dev, geowa...@geowanking.org

Brandon Martin-Anderson

unread,
Mar 12, 2012, 12:49:08 PM3/12/12
to Laurence Penney, osm-dev, geowa...@geowanking.org
Not directly. Stochastic optimizing processes, or optimizing processes
over stochastic data sets, tend to end up looking biological, because
biological systems are stochastic optimizing processes.

-B

Brandon Martin-Anderson

unread,
Mar 12, 2012, 1:05:01 PM3/12/12
to Sean Gorman, osm-dev, geowa...@geowanking.org
About thirty lines of javascript implementing a pretty brain-dead
breadth-first search:

https://github.com/bmander/vtp/blob/master/templates/game.html#L118

-B

On Mon, Mar 12, 2012 at 1:01 PM, Sean Gorman <se...@geoiq.com> wrote:
> Awesome work - for the shortest path calculation are you using an A*,
> Bellman-Ford type approach, or something else?  We tried a bunch of
> optimizations to a Floyd style all-to-all SP problem back in the day.
>  Tricky computations and always cool to see new approaches.  Not
> to mention a brilliant visualization of it all.
>
> thanks,
> sean

>> Geowanking mailing list
>> Geowa...@geowanking.org
>> http://geowanking.org/mailman/listinfo/geowanking_geowanking.org
>
>
>
>
> --
> Sean Gorman PhD.
> GeoIQ
> 2200 Wilson Blvd. Suite 307
> Arlington VA, 22201
> mobile: 202-321-3914
> office: 703-647-2151
>
> --
> This email and the information it contains are confidential and may be
> privileged. If you have received this email in error please notify me
> immediately. You should not copy it for any purpose, or disclose its
> contents to any other person. Internet communications are not secure and,
> therefore, FortiusOne does not accept legal responsibility for the contents
> of this message as it has been transmitted over a public network. If you
> suspect the message may have been intercepted or amended please contact the
> sender.

Mike N

unread,
Mar 18, 2012, 11:02:47 AM3/18/12
to d...@openstreetmap.org
On 3/12/2012 12:11 PM, Brandon Martin-Anderson wrote:
> Behold! I made a thing.
>
> http://shortestpathtree.org

Awesome - I'd like to play with this on nearby data. I can't seem to
figure out the server-side context used to execute the javascript. Do
you have more details on this?

Thanks!

Brandon Martin-Anderson

unread,
Mar 18, 2012, 4:16:39 PM3/18/12
to Mike N, d...@openstreetmap.org
Some of the js files are mapreduce scripts for preparing the data.
Some are clientside javascript, for serving to browsers. Some are for
node.js clientside javascript. Woo!

Bob Basques

unread,
Mar 12, 2012, 12:17:57 PM3/12/12
to geowa...@geowanking.org, Brandon Martin-Anderson, osm-dev

Interesting, is there a way to take into account a resistance value for each segment?


bobb




>>> Brandon Martin-Anderson <bad...@gmail.com> wrote:

Sean Gorman

unread,
Mar 12, 2012, 1:01:26 PM3/12/12
to Brandon Martin-Anderson, osm-dev, geowa...@geowanking.org
Awesome work - for the shortest path calculation are you using an A*, Bellman-Ford type approach, or something else?  We tried a bunch of optimizations to a Floyd style all-to-all SP problem back in the day.  Tricky computations and always cool to see new approaches.  Not to mention a brilliant visualization of it all.

thanks,
sean

On Mon, Mar 12, 2012 at 12:49 PM, Brandon Martin-Anderson <bad...@gmail.com> wrote:

--
Sean Gorman PhD.
GeoIQ
2200 Wilson Blvd. Suite 307
Arlington VA, 22201
mobile: 202-321-3914
office: 703-647-2151

Sean Gorman

unread,
Mar 12, 2012, 1:09:50 PM3/12/12
to Brandon Martin-Anderson, osm-dev, geowa...@geowanking.org
Cool you might get a bit better performance here:


Purely supposition on my part have not tested it

cheers,
sean
Reply all
Reply to author
Forward
0 new messages