Faraz Ahmad
Published

Enhancing Accessibility of Outdoor Environments for Visually

Tactile maps empower the visually impaired to navigate outdoor spaces independently and confidently.

BeginnerWork in progress111
Enhancing Accessibility of Outdoor Environments for Visually

Things used in this project

Story

Read more

Schematics

image

Code

code

Python
python
Copy code
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from shapely.geometry import Point, Polygon
from matplotlib.patches import PathPatch
from matplotlib.path import Path

# Define a function to create a tactile map plot
def create_tactile_map(polygons, points_of_interest, output_file):
    fig, ax = plt.subplots()

    # Plot polygons (e.g., trails or regions)
    for polygon in polygons:
        patch = PolygonPatch(polygon, facecolor='gray', edgecolor='black', alpha=0.5)
        ax.add_patch(patch)

    # Plot points of interest
    for point, label in points_of_interest:
        plt.plot(point.x, point.y, 'ro')  # Red dot for POI
        plt.text(point.x, point.y, label, fontsize=8, ha='right')

    ax.set_aspect('equal')
    plt.axis('off')

    # Save the plot to a file
    plt.savefig(output_file, format='png', dpi=300)

    plt.show()

# Example data
# Define polygons for trails or areas (coordinates in some unit)
polygons = [
    Polygon([(1, 2), (3, 4), (5, 2), (1, 2)]),
    Polygon([(6, 6), (8, 9), (10, 6), (6, 6)])
]

# Define points of interest with labels
points_of_interest = [
    (Point(2, 3), 'Trailhead'),
    (Point(7, 7), 'Scenic Viewpoint')
]

# Create a tactile map
create_tactile_map(polygons, points_of_interest, 'tactile_map.png')

Credits

Faraz Ahmad

Faraz Ahmad

1 project • 1 follower

Comments