Bring engineering and site plans in their native CAD formats onto the map, georeference them with control points or a source CRS, and serve the result as GeoJSON, MBTiles vector tiles, or GeoPackage — rendered alongside your basemaps and 3D scene layers.
DXF is read in-process via the managed OGR driver (always available). DWG and DGN fall back to external ogr2ogr with the OpenDesign / ODA driver — the response carries a driver field so the UI can tell you when a portable GDAL is needed.
GeoJSONLayer), MBTiles vector tiles (VectorTileLayer), and GPKG (FeatureLayer).// DWG/DXF/DGN → georeferenced layer fields: file = site-plan.dwg format = mbtiles-vector georefMode = controlPoints controlPoints = [ {src:[0,0], wgs84:[-74.00,40.71]}, {src:[500,0], wgs84:[-73.99,40.71]}, {src:[0,500], wgs84:[-74.00,40.72]} ] transformKind = affine // or polynomial-2 → driver:"ogr2OgrFallback" → served at /api/tiles/{id}/…
CAD lives in arbitrary drawing units. 3D Map Explorer gives you two robust paths onto the globe, both with a live RMSE preview before you commit.
Click ≥3 matching points between the drawing and the map. A least-squares affine (6-param) or polynomial-2 (12-param) transform is solved with RMSE reported — so you see the fit before importing.
If the plan already carries a real projected CRS (e.g. a UTM zone), supply it directly. OSR reprojects to WGS84 with no manual clicking.
| Capability | Endpoint | Notes |
|---|---|---|
| Preview | POST /api/cad/preview | Bounds, layers & GeoJSON in source coords |
| Convert | POST /api/cad/convert | Multipart → GeoJSON / MBTiles-vector / GPKG |
| Features | GET /api/cad/{id}/features.json | Transformed GeoJSON, ETag / 304 cached |
| Tiles | GET /api/tiles/{id}/{z}/{x}/{y} | MBTiles-vector rendering |
| Style | GET /api/tiles/{id}/style.json | Vector tile style |
| Spatial facades | /api/spatial/cad_{id}/… | MVT / OGC Features / FeatureServer |
| Remove | DELETE /api/cad/{id} | Removes from registry + deletes files |
Source: CAD_IMPORT.md and Src/LocalMapServer/Cad/ (CadReader, CadGeoreferencer, CadConverter, CadRoutes). Affine/polynomial math via least-squares; reprojection via GDAL/OSR.
Overlay DWG/DXF/DGN site plans on imagery and 3D terrain — georeferenced, tiled, and served from the desktop.