feat: add standalone maps-to-dxf web application

Node.js/Express server with web GUI for converting Google Maps links to DXF files. Includes optional Python ML server for satellite lot detection.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michael-A-SloanandCursor committed 2026-06-25 15:30:38 -04:00
1 parent b035ed1763
commit 7c20a404bf
14 files changed
+4491

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
# ML segmentation server for MAPS-to-DXF
Run this server to enable **Use server-side ML segmentation** in the app. It traces buildings, trees, and lots from satellite imagery.
## Run
```bash
pip install -r requirements.txt
python segment_server.py
```
Or double-click **Start_ML_Server.bat** from the project root.
Server listens on **http://127.0.0.1:3457**. The Node app proxies `/api/segment` to it.
## Backends
**Default: OpenCV** (Canny + contours)
- **Canny** edge detection (50, 150) on blurred, contrast-stretched grayscale.
- **RETR_EXTERNAL** so only outer contours are used.
Ref: [jydhasan/google_map_trace](https://github.com/jydhasan/google_map_trace).
- **approxPolyDP** with epsilon = 1% of contour perimeter.
- Classification by area/compactness; contours &lt; 15 m² skipped.
**Optional: Threshold mode (map-style)** (enable “Threshold mode (map-style)” in the app)
- Inspired by [NYPL map-vectorizer](https://github.com/nypl-spacetime/map-vectorizer): brightness + contrast then threshold to get a binary image (dark = features, light = background), then contours.
- Good for line-drawing imagery or high-contrast maps (e.g. scanned plans). Same contour classification as the default path.
- Optional form params: `brightness` (default 0), `contrast` (default 1.0), `thresholdBlack` (default 160), `thresholdWhite` (default 255). Dark pixels below `thresholdBlack` become foreground.
**Optional: VTracer** (enable “Use VTracer (cleaner vectors)” in the app, or set `USE_VTRACER=1`)
- [visioncortex VTracer](https://github.com/visioncortex/vtracer): raster → SVG, O(n), compact output.
- `pip install vtracer` in this folder, then use the checkbox or env var.
- Uses binary/line-art mode and filter_speckle for cleaner building outlines.