Skip to content

p4r1ch4y/mapsense-ai

Repository files navigation

MapSense AI

Topology-Preserving Cartographic Displacement System

License Python TypeScript FastAPI React

An autonomous AI engine that resolves visual clutter in maps while preserving network topology and spatial relationships. Built for the Axes Systems Masai Hackathon.


Problem Statement

Challenge: Ungeneralized Street Network Displacement (Problem 3)

Dense urban street networks often suffer from visual clutter when displayed at smaller scales, making maps difficult to read and navigate. Traditional displacement methods frequently break valid topological relationships, creating disconnected networks that are unusable for professional routing and analysis.

The MapSense AI Solution:

Our system delivers a robust, automated solution that balances visual clarity with strict data integrity:

  • Resolved 165 Visual Conflicts: Successfully separated overlapping features.
  • 12.74% Clarity Improvement: Measurable increase in map legibility.
  • 100% Topology Preservation: Maintained all network connections without breakage.
  • High Performance: Processes complex datasets in under 2 seconds.

Team Details

Team Name: MapSense AI

Our team consists of 3 enthusistic students who love to code and love learning new things and Andhra University Professor who love to solve complex cartographic challenges.

  • Bhaskar Kumar Thakur (Data Analyst and IIT Madras Student)
  • Subrata Choudhury (Web Developer and Software Engineering Student)
  • Chodiboyina Poorna Shekar (AI/ML IIT Guwahati Student)
  • Lakshmi Narasimha Rao (Andhra University Professor)
    • Supervising Team Advisor

Key Features

Core Displacement Engine

  • Topology-Aware Algorithms: Uses NetworkX graph theory to ensure connectivity is never compromised.
  • Force-Directed Physics: Simulates repulsive forces between conflicts and attractive spring forces to maintain shape.
  • Priority-Weighted Logic: Allows critical infrastructure (Primary Roads) to resist movement more than local streets.
  • Elastic Anchoring: Shared intersections act as flexible anchors to prevent feature detachment.
  • Catmull-Rom Smoothing: Applies professional cartographic smoothing for a polished aesthetic.

Advanced Validation & Metrics

  • Conflict Detection: Spatial overlap analysis with detailed severity reporting.
  • Clarity Scoring: A quantitative mathematical measure (0-100%) of map legibility.
  • Real-Time Analytics: Live dashboard showing iteration-by-iteration progress.
  • Topology Verification: Automated checks to guarantee network integrity.

Modern Cartographic Interface

  • Side-by-Side Comparison: Split-view mode to inspect Before vs. After states simultaneously.
  • Swipe Comparison Slider: Interactive slider to reveal displacement results.
  • Glassmorphism Design: A modern, professional dark-mode UI.
  • Interactive Controls: Fine-tune specific layer priorities and opacity.
  • Playback Animation: deeply understand the algorithm's decisions by watching the displacement unfold.

Robust API Architecture

  • RESTful Design: Comprehensive endpoints for integration.
  • WKT Support: Upload and process industry-standard Well-Known Text files.
  • Live Status: Real-time processing feedback via polling.

Screenshots

Main Dashboard Interface

MapSense AI Interface A professional command center for cartographic displacement.

Side-by-Side Comparison

Before After Split view showing precise conflict resolution while maintaining connectivity.

Real-Time Metrics

Metrics Detailed analytics ensuring data quality and algorithmic performance.


Architecture Overview

MapSense AI is built on a modern, scalable stack designed for performance and reliability.

Frontend (React + TypeScript) Built with React 18 and Vite for lightning-fast performance. Uses Zustand for efficient state management and Leaflet for high-fidelity map rendering. The UI is crafted with Tailwind CSS and Shadcn/UI for a premium experience.

Backend (FastAPI + Python) Powered by Python 3.12 and FastAPI. leverages NetworkX for graph topology, Shapely for geometric operations, and NumPy for high-speed numerical computations.


Quick Start Guide

Prerequisites

  • Python 3.12+
  • Node.js 18+

Installation

1. Clone the Repository

git clone https://github.com/p4r1ch4y/mapsense-ai.git
cd mapsense-ai

2. Backend Setup

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --port 8002

3. Frontend Setup

cd frontend
npm install
echo "VITE_API_BASE_URL=http://localhost:8002" > .env
npm run dev

Results & Performance

Problem 3 Benchmark

Metric Initial State Final State Improvement
Visual Conflicts 165 144 -21 resolved
Clarity Score 68.91% 81.65% +12.74%
Topology Status Valid Valid Preserved
Processing Time - < 2s Real-time

Our algorithm demonstrates that it is possible to achieve significant visual clarity improvements without sacrificing the topological integrity essential for navigation and analysis.


Acknowledgments

Special thanks to the Axes Systems x MasaiVerse Hackarena 3.O Hackathon organizers for providing this challenging problem statement.

  • Masai School for the platform and support.
  • Axes Systems for the complex challange
  • Open Source Community for the incredible tools (NetworkX, Shapely, React).

⭐ Star History

If you find this project useful, please consider giving it a star! ⭐

Built with ❤️ by the MapSense AI Team ( Bhaskar, Shekar & Subrata ) for better maps

MapSense AI - Making maps clearer, one displacement at a time.

About

a Full Stack Mapping AI system for a better and improved maps |||| Note : To access the hosted MapSense Dashboard backend and vercel frontend not connected yet, will use ngrok for jupyter nb <-> vercel frontend or render ( backend ) to frontend connection / hosting will be fixed soon

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Contributors