Skip to content

kloba/geointer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geointer

AI-Powered Geolocation Intelligence from a Single Photo

Geointer is an intelligent geolocation system built with the GitHub Copilot SDK. Upload any photograph of a building or place, and Geointer will identify its exact location on a map — typically within 2 minutes.

No GPS metadata needed. Works with screenshots, social media images, and photos with stripped EXIF data.

How It Works

Geointer runs a fully automated multi-phase pipeline:

  1. EXIF & Metadata Extraction — Parses GPS coordinates, camera info, and timestamps. If GPS is present, location is resolved instantly.
  2. LLM Visual Analysis — A large language model analyzes the image for visual clues (architecture, signs, vegetation, road markings) and estimates an approximate location.
  3. Reverse Image Search — The photo is sent to a visual search engine to find matching images across the web.
  4. LLM Image Comparison — Each discovered image is compared with the original using a vision model. Only confirmed matches (same building/place) proceed further.
  5. LLM Location Extraction — For matched pages, a language model extracts street addresses formatted for geocoding.
  6. Geocoding & Consensus — Extracted addresses are geocoded via Nominatim (OpenStreetMap). A quorum-based consensus algorithm selects the best location when multiple sources agree.

Results stream to the UI in real-time via Server-Sent Events (SSE).

Architecture

                        ┌──────────────┐
                        │  Upload Photo│
                        └──────┬───────┘
                               │
               ┌───────────────┼───────────────┐
               │               │               │
               ▼               ▼               ▼
        ┌─────────────┐ ┌───────────┐ ┌──────────────┐
        │ EXIF Parse  │ │ LLM Geo   │ │ Lens Upload  │
        │ GPS, camera,│ │ Visual    │ │ Reverse image│
        │ timestamps  │ │ analysis  │ │ search       │
        └──────┬──────┘ └─────┬─────┘ └──────┬───────┘
               │              │               │
               │         ┌────┘               ▼
               │         │          ┌──────────────────┐
               │         │          │ Lens Search      │
               │         │          │ Find matching    │
               │         │          │ pages online     │
               │         │          └────────┬─────────┘
               │         │                   │
               │         │                   ▼
               │         │          ┌──────────────────┐
               │         │          │ Page Analysis    │
               │         │          │                  │
               │         │          │ Visit pages      │
               │         │          │     ▼            │
               │         │          │ LLM image compare│
               │         │          │ (match score %)  │
               │         │          │     ▼            │
               │         │          │ LLM address      │
               │         │          │ extraction       │
               │         │          │     ▼            │
               │         │          │ Geocode per page │
               │         │          └────────┬─────────┘
               │         │                   │
               ▼         ▼                   ▼
        ┌─────────────────────────────────────────────┐
        │           Consensus Scoring                  │
        │  Cluster results within 50km, quorum vote   │
        │  Most agreeing sources → best location      │
        └──────────────────────┬──────────────────────┘
                               │
                               ▼
                     ┌──────────────────┐
                     │  Map + Results   │
                     │  Multi-marker    │
                     │  map with all    │
                     │  candidates      │
                     └──────────────────┘

External Services:
  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐
  │ GitHub       │  │ Apify        │  │ Nominatim    │
  │ Copilot SDK  │  │ Visual Search│  │ OpenStreetMap│
  └──────────────┘  └──────────────┘  └──────────────┘

Key Technologies

  • GitHub Copilot SDK — AI model orchestration
  • Next.js 15 — Full-stack React framework
  • Leaflet / react-leaflet — Interactive map with multi-marker support
  • Nominatim (OpenStreetMap) — Forward and reverse geocoding
  • Apify — Visual search integration
  • Server-Sent Events — Real-time streaming pipeline results

Features

  • Multi-marker map — All geocoded candidates shown with confidence-based coloring
  • Image comparison — Vision model confirms matches with percentage confidence scores
  • Consensus scoring — Quorum-based algorithm: locations with the most agreeing sources win
  • Preliminary results — LLM geolocation provides a fast estimate while deeper analysis runs
  • Evidence panel — Per-page analysis cards showing match status, extracted addresses, and geocoded coordinates
  • Camera direction — Estimates compass bearing from visual cues

Getting Started

Prerequisites

  • Node.js 18+
  • npm

Setup

# Clone the repository
git clone https://github.com/kloba/geointer.git
cd geointer/web

# Install dependencies
npm install

# Configure environment
cp .env.example .env.local
# Edit .env.local with your API keys

# Start development server
npm run dev

Open http://localhost:3000 and upload a photo.

Environment Variables

Variable Description
APIFY_API_TOKEN Apify API token for visual search
GITHUB_TOKEN GitHub token with Copilot access

Project Structure

geointer/
├── src/
│   └── agent/
│       └── tools/           # Custom tool implementations
│           ├── extract-exif.ts
│           ├── llm-compare.ts
│           ├── llm-extract-location.ts
│           ├── llm-geolocate.ts
│           ├── forward-geocode.ts
│           ├── reverse-geocode.ts
│           ├── sun-position.ts
│           └── visit-page.ts
├── web/
│   ├── app/
│   │   ├── page.tsx         # Main page
│   │   ├── api/analyze/     # Pipeline API endpoint
│   │   └── globals.css
│   ├── components/
│   │   ├── MapView.tsx      # Multi-marker Leaflet map
│   │   └── ResultsPanel.tsx # Analysis results UI
│   └── lib/
│       ├── pipeline.ts      # Orchestration pipeline
│       └── types.ts         # Type definitions
├── docs/
│   ├── README.md            # Full documentation (problem, solution, setup, RAI)
│   └── spec/
│       └── geointer-agent.md
├── presentations/
│   └── Geointer.pptx        # Challenge presentation
├── AGENTS.md                # Agent pipeline & tool docs
├── mcp.json                 # MCP server config
└── README.md

Full documentation: See docs/README.md for detailed setup, deployment, architecture, and responsible AI notes.

Enterprise Use Cases

  • OSINT & Threat Intelligence — Identify locations from surveillance or social media imagery
  • Real Estate Verification — Confirm property locations from listing photos
  • Insurance Claim Validation — Verify incident locations from submitted photos
  • Journalism & Fact-Checking — Geolocate images for story verification
  • Law Enforcement — Support investigations with photo-based location identification

Copilot SDK Enterprise Pattern

This project demonstrates how the GitHub Copilot SDK can replace a complex backend stack with a single orchestration layer. The SDK provides:

  • Model access via Copilot subscription (no separate AI service billing)
  • Tool orchestration — custom tools for geocoding, web scraping, image analysis
  • Streaming — real-time SSE events for progressive result delivery

Adding new capabilities is as simple as defining new tools — no infrastructure changes needed.

License

MIT

About

AI-powered geolocation intelligence from a single photo, built with the GitHub Copilot SDK

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages