Skip to content

sponticelli/GeoMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoMap: Interactive Geographic Data Visualization

A Unity project demonstrating human-AI collaboration in software development, focused on creating an interactive geographic data visualization system using GeoJSON data.

Project Overview

This project serves as a comprehensive case study in human-AI collaborative software development, showcasing how humans and AI can work together effectively to build complex, interactive applications. The GeoMap system transforms GeoJSON geographic data into an interactive 3D Unity application with country selection, highlighting, and camera controls.

Purpose Statement

This was a human-AI collaboration experiment designed to explore and demonstrate effective patterns for human-AI partnership in software development. The project focused on:

  • Testing iterative development workflows between human developers and AI assistants
  • Exploring AI capabilities in complex Unity development tasks
  • Establishing best practices for steering AI tools through multi-component software projects
  • Demonstrating how AI can assist with both architectural decisions and implementation details

What the Project Accomplishes

The GeoMap application demonstrates several key technical achievements:

Core Functionality

  • Interactive World Map: Renders countries from GeoJSON data as interactive 3D meshes
  • Country Selection System: Click-to-select countries with visual highlighting
  • Camera Controls: Mouse-based pan, zoom, and focus functionality with smooth transitions
  • Real-time Highlighting: Dynamic material switching for selected countries
  • Modular Architecture: Clean separation of concerns with well-defined component responsibilities

Technical Features

  • Asynchronous Mesh Generation: Non-blocking country mesh creation for smooth performance
  • Advanced Computational Geometry: Integration of Delaunay triangulation and mesh processing algorithms
  • Event-Driven Architecture: Unity Events system for loose coupling between components
  • Proper Serialization: Full Unity Inspector integration with proper serialization patterns
  • Scalable Design: Extensible architecture supporting additional geographic features

Key Components Developed

Core Systems

  1. GeoMapController: Main orchestrator coordinating all map functionality
  2. MapBuilder: Handles GeoJSON parsing and country GameObject creation
  3. CountryMeshBuilder: Converts geographic coordinates to Unity meshes
  4. InputManager: Processes user input and raycasting for country selection
  5. CameraController: Manages camera movement, zoom, and focus operations

Visual Management

  1. CountryVisuals: Controls material switching and highlighting states
  2. CountryInfo: Stores country metadata and component references
  3. CountrySelectionManager: Manages selection state and events
  4. CountryHighlighter: Provides visual feedback for country interactions

Computational Geometry Library

  1. Comprehensive triangulation system with multiple algorithms
  2. Mesh optimization and smoothing tools
  3. Voronoi diagram generation
  4. Advanced geometric primitives and utilities

Lessons Learned from Human-AI Collaboration

Through this development process, several key insights emerged about effective human-AI collaboration:

✅ What Works Well

  • Human-AI collaboration involves steering AI tools through iterative tasks: The human developer provides high-level direction while the AI handles implementation details
  • AI can help with data processing and suggesting alternatives: AI excels at parsing complex data structures, generating boilerplate code, and proposing architectural solutions
  • Detailed task descriptions and code context guide AI effectively: Providing specific requirements, existing code examples, and clear constraints leads to better AI output

🎯 Critical Success Factors

  • Humans should control high-level problem solving and architecture: Strategic decisions, overall system design, and user experience considerations remain human responsibilities
  • Provide detailed task descriptions and code to guide AI: The more context and specificity provided, the more accurate and useful AI assistance becomes
  • Know when to interrupt and reset AI tasks to stay on track: Recognizing when AI is going down unproductive paths and redirecting early prevents wasted effort

🔄 Iterative Development Patterns

  • Break complex features into smaller, manageable tasks: AI performs better with focused, well-defined objectives
  • Use AI for rapid prototyping and refinement: AI can quickly generate multiple implementation approaches for evaluation
  • Maintain human oversight of integration and testing: While AI can write individual components, humans excel at ensuring system cohesion

Technical Architecture

The project follows clean code principles with a modular, event-driven architecture:

GeoMapController (Main Orchestrator)
├── MapBuilder (Data Processing)
│   └── CountryMeshBuilder (Mesh Generation)
├── InputManager (User Input)
├── CountrySelectionManager (Selection Logic)
├── CameraController (Camera Management)
└── CountryVisuals (Visual Management)

Development Approach

This project demonstrates a collaborative development methodology where:

  1. Human developers define requirements, architecture, and user experience
  2. AI assistants implement components, suggest optimizations, and handle repetitive tasks
  3. Iterative refinement occurs through continuous human feedback and AI adaptation
  4. Quality assurance remains under human control with AI-assisted testing

Getting Started

Prerequisites

  • Unity 6 or later
  • Basic understanding of Unity development
  • GeoJSON data file (included in Assets/Data/)

Setup

  1. Clone the repository
  2. Open the project in Unity
  3. Load the Main scene (Assets/Scenes/Main.unity)
  4. Press Play to interact with the world map

Usage

  • Click on countries to select them
  • Mouse wheel to zoom in/out
  • Middle mouse drag to pan the camera
  • Selected countries are highlighted with different materials

Branches

  • main: Clean project structure showcasing the final collaborative result
  • prototype: Original implementation demonstrating the iterative development process, without human intervention

This project demonstrates that effective human-AI collaboration in software development requires clear communication, proper task decomposition, and maintaining human oversight of architectural decisions while leveraging AI strengths in implementation and optimization.

About

A sandbox repository for experimenting with AI coding agents that automate the process of downloading, deserializing, and visualizing GeoJSON data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors