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

+55 -42
View File
@@ -1,52 +1,65 @@
@echo off
setlocal
title MAPS to DXF
cd /d "%~dp0"
where node >nul 2>&1
if %errorlevel% neq 0 (
echo Node.js not found. Installing via Windows Package Manager...
winget install OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements 2>nul
if %errorlevel% neq 0 (
echo.
echo Could not install Node.js automatically. Opening download page...
start https://nodejs.org/
echo.
echo After installing Node.js, close this window and double-click Start.bat again.
pause
exit /b 1
)
echo.
echo Node.js installed. Please close this window, then double-click Start.bat again.
pause
exit /b 0
)
if errorlevel 1 goto INSTALL_NODE
goto DEPS
if not exist "node_modules" (
echo Installing dependencies...
call npm install
) else if not exist "node_modules\multer" (
echo Installing missing dependencies...
call npm install
)
if exist "ml_server\segment_server.py" (
where python >nul 2>&1
if %errorlevel% equ 0 (
start "MAPS to DXF - ML Server" cmd /k "call %~sdp0Start_ML_Server.bat"
timeout /t 2 /nobreak >nul
) else (
where py >nul 2>&1
if %errorlevel% equ 0 (
start "MAPS to DXF - ML Server" cmd /k "call %~sdp0Start_ML_Server.bat"
timeout /t 2 /nobreak >nul
)
)
)
:INSTALL_NODE
echo Node.js not found. Installing via Windows Package Manager...
winget install OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements
if errorlevel 1 goto NODE_FAIL
echo Node.js installed. Close this window, then double-click Start.bat again.
pause
exit /b 0
:NODE_FAIL
echo Could not install Node.js automatically. Opening download page...
start https://nodejs.org/
echo After installing Node.js, close this window and double-click Start.bat again.
pause
exit /b 1
:DEPS
if not exist "node_modules\express" goto NPM_INSTALL
if not exist "node_modules\multer" goto NPM_INSTALL
goto PORTS
:NPM_INSTALL
echo Installing dependencies...
call npm install
if errorlevel 1 goto NPM_FAIL
goto PORTS
:NPM_FAIL
echo npm install failed.
pause
exit /b 1
:PORTS
echo Freeing ports 3456 and 3457 if a previous run is still open...
powershell -NoProfile -Command "foreach ($p in 3456,3457) { Get-NetTCPConnection -LocalPort $p -State Listen -ErrorAction SilentlyContinue | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue } }" >nul 2>&1
set "PY="
where python >nul 2>&1
if not errorlevel 1 set "PY=python"
if defined PY goto ML_DEPS
where py >nul 2>&1
if not errorlevel 1 set "PY=py"
if not defined PY goto START_APP
:ML_DEPS
if not exist "ml_server\requirements.txt" goto START_APP
echo Checking Python ML dependencies...
"%PY%" -m pip install -r "ml_server\requirements.txt" -q
:START_APP
echo Starting MAPS to DXF...
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":3456" ^| findstr "LISTENING"') do taskkill /PID %%a /F >nul 2>&1
echo Browser will open. Keep this window open while using the app.
if exist "ml_server\segment_server.py" echo (ML server started in the other window - enable "Use server-side ML segmentation" in the app.)
echo Browser will open. Keep this window open.
echo Close this window to stop the app.
echo.
node server.js
echo.
call npm start
pause