Skip to content

Navigation program that helps users know a facility better, and finds the shortest path in the facility with visualization

Notifications You must be signed in to change notification settings

sayaaoi/Map_Navigation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map Navigation

Overview

This program can help people know information about a large museum, zoo, or amusement park, and visualize the map of it. It can determine the “best” route for visitors to take through the facility, given its mapping knowledge of the facility and where (a selection of) the attractions and the paths or hallways between them. The image above is a visualization example of Xcaret Amusement Park in Mexico generated by this program.

The program uses Python NetworkX library. I use it as the main data structure within my custom class.

Visualization

Full map

Once the user chooses the map type (either ADA map or non-ADA one) the user will be given an image of the map with all attractions listed along with their numbers in upper left side of the map. Each attraction(node) will have different color based on its type. For non-ADA map, it will also show water route(edge) in blue color. None of the ADA route is water. One example of non-ADA map is showed under Demo.

Route map

The program will visualize the shortest path based on distance between two locations.

Let's take the example of Xcaret Amusement Park, we want to know the path from node 17 to node 36. The first image is the path for people who don't have handicapped-accessible requirement. The second image is the path for people who have handicapped-accessible requirement.

Path for non-disabled people:

route_map1

Path for disabled people:

route_map2

Output

When the program runs, it will:
o Let users choose to see an example of navigation or create one on their own.
o Alphabetically list all the attractions with location numbers.
o Ask whether the user requires a handicapped-accessible route, and then show a full map.
o Ask users whether they want to:

  1. Know how to get to the next location(defaults to starting at the last end point)
  • Ask the user to enter their starting point and the next attraction number they want to visit.
  • Then the program will calculate a shortest path and print clear turn-by-turn navigation instructions with total distance.
  • Visualize the route on the map
  1. Know detailed information about a specific location
  2. Find all attractions that are suitable for disabled people
  3. Find whether a given location is suitable for disabled people
  4. Find all attractions that are open at a given time
  5. Find the nearest bathroom
  6. Find the nearest food place
  7. Quit the program
  8. Start another navigation query.


Demo

The following screenshots are outputs ran by this program:

output flow

full map

route map

route map

route map

route map

route map

route map

route map

route map

Instructions on how to use the program:

Put data along with Navigation program, Main program and Route visualization program under the same directory, and run Main program. Then follow the instructions in console.

In order to create a map on your own, you need to provide two csv files. One is for node information, and the other is for edge information.
If you only want to see the example, you can just run the program without worrying about the following requirements.

Requirements for node file:

  • It must be .csv file

  • The first row must contain

       *The following column name could vary but have to be at the first of all column names:*
       'location label' (could be any data type; it will appear on nodes in the map)
       
       *The following column names have to be in the file. The order doesn't matter:*
       'name'        
       'disabled_accessibility'
       'open_time': example format (9AM); hour:[0,12], minute:[0,59]; have to include 'AM' or 'PM'
       'close_time': same as 'open_time'
       'avg_wait_time': has to be number
       'has_bathroom': value should be 1 or 0
       'has_food': value should be 1 or 0
       'fee'	       
       'type'        
       'x_coord': has to be integer
       'y_coord': has to be integer
    
    

Requirements for edge file:

  • It must be .csv file

  • The first row must contain

    *The following column names have to be the same and have to be at the first, second and fifth of all column names (order matters):*
    'start_id'	
    'end_id'	
    'ADA'
    
    *The following column names have to be in the file. The order doesn't matter:*
    'distance': actual miles * 1000 (due to distance scale in the program)
    'type'
    'direction': must be one of 'N', 'S','W','E','SE','SW','NE','NW'
    
    

All Sources Used:

Legend of NetworkX graph
Check whether a file exists
Set node attributes
Encoding issue when reading files
Time format in Python
NetworkX tutorial
Named colors in Python
Text in pyplot
plt title font size
plt legend argument
Doctest_whitespace
Link inside Markdown

About

Navigation program that helps users know a facility better, and finds the shortest path in the facility with visualization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages