Sniff Tool
Playwright-based browser interception that captures vector data from indoor map providers.
Usage
bash
python3 agent/tools/mappedin-sniff/sniff.py <map-page-url> -o <output-dir>/Opens a mall's map page in a headless browser, waits for the mapping SDK to load data, saves all intercepted API responses as JSON files.
Works across all providers — captures whatever JSON/SVG the mapping SDK loads.
Output Files (Mappedin)
| File | Content | Size |
|---|---|---|
public_1_polygon_*.json | All polygons with vertex coordinates | 0.5–6 MB |
public_1_location_*.json | Store names, amenity locations, metadata | 0.5–2 MB |
public_1_map_*.json | Floor definitions with georef control points | 50–90 KB |
public_1_theme_*.json | Visual theme settings | Small |
exports_mvf2_1_bundle.json | SDK bundle metadata | Small |
CV Fallback
agent/scripts/trace_units.py — OpenCV-based image tracing for malls without sniffable vector data. Multiple detection strategies: sensitive edge detection, color segmentation, dark anchor detection. 63 tests with golden fixtures.
Use sniff first. CV is fallback only for non-interactive floor plan images.