★ New · feat/cad-import

Decades of as-builts, on the map

Every utility has file cabinets of substation one-lines, yard layouts, and line drawings locked in CAD. Bring them onto the map in their native DWG, DXF, and DGN formats, rubber-sheet them into place with control points or a source CRS, and serve the result as GeoJSON, MBTiles vector tiles, or GeoPackage — rendered alongside your basemaps, corridor imagery, and 3D scene layers.

DWGDXFDGN EPSG:4326EPSG:3857MBTiles-vectoraffine · polynomial-2
What it reads

Three CAD formats, three outputs

DXF is read in-process via the managed OGR driver (always available). DWG and DGN — the formats most substation and transmission as-builts live in — 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.

  • Outputs served as layers: GeoJSON (GeoJSONLayer), MBTiles vector tiles (VectorTileLayer), and GPKG (FeatureLayer).
  • All output geometry normalized to EPSG:4326 (WGS84); the MBTiles path additionally reprojects 4326 → 3857 during tiling.
  • Files written in-process for DXF/GPKG — no external GDAL required for the common case.
POST /api/cad/convert (multipart)
// 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}/…
Two ways to georeference

From drawing coordinates to real-world positions

As-builts live in arbitrary drawing units. VoltGrid gives you two robust paths onto the globe, both with a live RMSE preview before you commit — so a 1970s yard drawing lands exactly on today's substation fence line.

🎯

Control points

Click ≥3 matching points between the drawing and the map — fence corners, structure bases, road intersections. A least-squares affine (6-param) or polynomial-2 (12-param) transform is solved with RMSE reported — so you see the fit before importing.

🌐

Source EPSG

If the plan already carries a real projected CRS (e.g. the State Plane or UTM zone your engineering standards use), supply it directly. OSR reprojects to WGS84 with no manual clicking.

In-App Screenshots

CAD Georeferencing, Vector Layers & Layout Designer

VoltGrid desktop — CAD drawing import dialog with source CRS selection
CAD drawing import modal configuring source Coordinate Reference System (CRS / EPSG) and georeferencing mode
VoltGrid desktop — CAD point feature layer loaded over Africa
Georeferenced CAD point feature layer imported and rendered directly over the map canvas
VoltGrid desktop — CAD arc and vector linework layer rendered on map
CAD arc and polyline vector layers converted and rendered with hardware-accelerated symbology
VoltGrid desktop — Map Layout Designer and sheet composer
Map Layout Designer child window with cartographic canvas tools, map frames, and elements for engineering print deliverables
The conversion API

Convert, preview, serve

CapabilityEndpointNotes
PreviewPOST /api/cad/previewBounds, layers & GeoJSON in source coords
ConvertPOST /api/cad/convertMultipart → GeoJSON / MBTiles-vector / GPKG
FeaturesGET /api/cad/{id}/features.jsonTransformed GeoJSON, ETag / 304 cached
TilesGET /api/tiles/{id}/{z}/{x}/{y}MBTiles-vector rendering
StyleGET /api/tiles/{id}/style.jsonVector tile style
Spatial facades/api/spatial/cad_{id}/…MVT / OGC Features / FeatureServer
RemoveDELETE /api/cad/{id}Removes from registry + deletes files

Georeferencing supports affine and polynomial transformations via least-squares adjustment; reprojection is handled via GDAL/OSR.

Engineering drawings meet the grid

Overlay DWG/DXF/DGN as-builts on imagery and 3D terrain — georeferenced, tiled, and served from the desktop. VoltGrid is built for the same design-to-GIS bridge utilities run with PLS-CADD structure and conductor data, with FileGDB, PostGIS, GPKG, and GeoJSON on the way out.