feat: harden maps export for CAD and improve satellite/OSM workflow

Cap zoom to real imagery, attach a BricsCAD-safe DXF IMAGE at the selected extent, and consolidate startup plus Overpass/address handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michael-A-SloanandCursor committed 2026-08-31 15:43:01 -04:00
1 parent fadfb807ec
commit 7769a4412e
8 files changed
+1186 -330

No files matched your search

+3 -9
View File
@@ -15,7 +15,7 @@ Turn a **Google Maps link** into a **DXF map** with roads, rails, buildings, and
**Easiest:** Double-click **Start.bat**.
- If Node.js isn’t installed, the script will try to install it (Windows Package Manager) or open the Node.js download page. After installing, run **Start.bat** again.
- If Node.js is installed: the app starts, your browser opens to the app. Keep the console window open while using it; close it to stop the server.
- If Node.js is installed: the app starts in **one window**, your browser opens, and the optional Python ML server starts in the background if Python is installed. Keep the console window open while using it; close it to stop everything.
**Or from a terminal:**
@@ -67,7 +67,7 @@ Then open http://localhost:8080
| File / folder | Role |
|--------------------|------|
| `Start.bat` | One-click run on Windows (installs Node if needed, then `npm start`) |
| `Start.bat` | Only launcher you need: installs Node if needed, frees ports, starts the app + optional ML |
| `server.js` | Express server: serves `public/`, proxies Overpass and tile API |
| `public/index.html`| Single-page UI + canvas preview + all map/lot/edit logic (inline script) |
| `public/app.js` | Shared helpers: OSM→preview, DXF generation, OSM lot/concave-hull logic |
@@ -79,13 +79,7 @@ Then open http://localhost:8080
- **Generate drawing from imagery** — Vectorizes satellite imagery into the DXF (client-side edge detection).
- **Use server-side ML segmentation** — Sends the imagery to a small Python server that runs OpenCV Canny + contours and classifies buildings, trees, and lots. Export writes separate DXF layers: **IMAGERY_BUILDINGS**, **IMAGERY_TREES**, **IMAGERY_LOTS**.
**To enable:** In a second terminal:
```bash
cd ml_server
pip install -r requirements.txt
python segment_server.py
```
The Python server runs on **http://127.0.0.1:3457**. The Node app proxies `/api/segment` to it. If the Python server is not running, the checkbox will show an error when you use it.
**To enable:** Double-click **Start.bat**. If Python is installed, the ML server starts automatically with the app (port 3457). If Python is missing, satellite tracing still works.
- **Snap imagery trace to OSM** — When enabled, trace points are snapped to nearby OSM buildings, roads, and landuse (within ~1.5 m). Use this to align the imagery trace with OSM where data exists.