Measure the area of rooftops and regions from Google Maps screenshots.
pip install -r requirements.txt# Open with file dialog
python main.py
# Open a specific image directly
python main.py /path/to/screenshot.pngGoogle Maps always shows a scale bar at the bottom-left of the map.
- Press R (or click "Measure Scale Bar")
- Click the left end of the scale bar in your screenshot
- Click the right end of the scale bar
- In the sidebar, enter the real distance shown on that scale bar (e.g.
50for "50 m")
- Press P (or click "Draw Polygon")
- Click around the edges of the roof/region
- Press Enter or double-click to close — or click near the first point (it snaps)
Area, bounding box dimensions, and perimeter are shown in the sidebar. Switch units (m², ft², yd², km², acre) from the dropdown.
Press Ctrl+E or click "Export Results" to save as JSON, CSV, or TXT.
| Key | Action |
|---|---|
| P | Polygon mode |
| R | Ruler mode |
| Enter | Close polygon |
| Ctrl+Z | Undo last point |
| Esc | Clear all |
| Scroll | Zoom in/out |
| Middle drag | Pan |
| Ctrl+O | Open image |
| Ctrl+E | Export results |
Accuracy depends on how precisely you measure the scale bar. Zoom in on the scale bar before measuring for best results. The tool uses the Shoelace formula for polygon area calculation.
map_area_tool/
├── main.py # Entry point
├── requirements.txt
└── app/
├── canvas.py # Interactive image canvas (drawing, zoom, pan)
├── geometry.py # Area/perimeter math + unit conversions
├── panels.py # Sidebar UI panels
└── window.py # Main window, wires everything together