An interactive heatmap tool to visualize your photo and video geolocation data, supporting large datasets and high-performance rendering.
✅ Incremental updates with --add-data option
✅ Supports multiple media formats: HEIC/HEIF, JPG, PNG, MP4, MOV, and other mainstream photo and video formats
✅ Intelligent GPS data parsing (photo + video location)
✅ AMap API address parsing (automatic coordinate correction)
✅ Dynamic heatmap rendering (supports testing with 100,000+ data points)
✅ Responsive sidebar statistics panel
✅ Customizable heatmap style adjustment
✅ Spatiotemporal filtering (filter by time and map area)
✅ Efficient mechanical hard drive storage optimization
- Python 3.8+
- ExifTool (Installation Guide)
- AMap API Key (Apply Here)
- Clone the repository:
git clone https://github.com/optimistices-me/MediaGPS2Map.git
cd MediaGPS2Map- Install dependencies:
pip install flask requests- Configure
config.json:
{
"AMAP_API_KEY": "Your AMap API key",
"directories": [
"Directory 1",
"Directory 2"
],
"batch_size": 200
}- Initialize the database (first-time run):
python app_hdd.py- Add new media files (incremental update):
python app_hdd.py --add-data "newDirectory"- Start the service (for subsequent runs, use
--skip-dbto skip database initialization):
python app_hdd.py --skip-db- Access the webpage:
Open your browser and go to http://localhost:5000
- Heatmap Interaction
- Drag the timeline to filter the date range
- Zoom the map to view heat distribution at different levels
- Click on a hotspot to view detailed media file information
- Sidebar Features
- Real-time statistics of the data in the current view
- Display typical geographic location distribution
- Adjust heatmap parameters (radius/blurriness/opacity)
- Performance Optimization
- When using mechanical hard drives, it is recommended to set
batch_size=200-1000 - Zoom to the appropriate level to automatically aggregate data points
- Use WAL mode to enhance database concurrency performance
- Backend: Python + Flask + SQLite
- Frontend: Leaflet + Leaflet.heat
- Geoservices: AMap API
- Metadata Parsing: ExifTool
| Parameter | Default Value | Description |
|---|---|---|
| batch_size | 500 | File processing batch size (recommended 200-500 for mechanical hard drives) |
| AMAP_API_KEY | Required | AMap Web Service API Key |
| directories | Required | List of media file storage paths |
❗ Do not expose the API key in config.json
❗ Processing a large number of files for the first time may take a long time (recommended to run in the background)
❗ Windows systems require ExifTool to be installed separately and added to the PATH
MIT License © 2025 Optimistices-Me