views:

89

answers:

2

I want to make a map program that gives directions around a campus (residence halls, football field, etc), and within buildings (to offices, cafeteria, etc). Is there anything existing that would help facilitate that?

The alternative seems to be that I would have to create my own map of points and paths around campus and do path-finding for directions.

EDIT: To clarify, I'm wanting to know about how to add spatial awareness to a pathfinding program, in order to generate walking directions for the path. Example: for a hallway full of offices that has two nodes that allow a path to enter the hallway, how do you know if a certain office is on the left from one node and on the right from another?

A: 

This is pretty hard to answer without knowing what sort of interface you want. Is it supposed to be a Google Maps-type application? Or something simpler? No matter what you're probably going to have to define paths - what things are impassable.

You could do a lot of work and define what's impassable and then use a path-finding algorithm to walk across lawns; but that'd be more work than the simple approach:

  1. Make a map of campus with all the routes greyed out
  2. Define the points and paths in PHP/Perl/Ruby/Python/Coldfusion/ASP.Net/Whatever
  3. Get the Start and Destination from the user
  4. Run Dijkstra's Algorithm
  5. Display the map of campus with overlays highlighting the route segments to light up their path.
Tom Ritter
It is supposed to function similar to Google Maps, but within an area that GoogleMaps doesn't currently cover (offices, classrooms, etc). Getting around campus from building to building doesn't look that hard (using A*); even finding classrooms doesn't look too bad. The complex part, to me, is generating directions for the route. I'm not sure how to give the program spatial awareness ("Go 100 feet. Room 2467B is on the *left*." If a hallway has two nodes that a path can enter from, how do you determine left and right?
I Never Finish Anythi
+1  A: 

If I use polygons for the nodes instead of waypoints, I can create a navigation mesh that can be used for pathfinding and directions. For directions and using a rectangle node, if I give the rectangle numbers for its sides from 1 to 4 going clockwise from the top, I know that if I enter side 2 and leave side 1, it's a right hand turn. Or, if I enter side 3 (say, the bottom) and leave side 4, it's a left.

I Never Finish Anythi

related questions