Skip to content

jonseitz/dxf-conversion-script

Repository files navigation

DXF Conversion Script

A quickie script to read in a directory of dxf files, strip out most of the layers, and write to SVG and JSON formats.

Used as the first stage of My Mapping Project.

Conversion

  1. Copy all dxf files into ./dxf.

  2. npm start

This will generate svg files for each layer in the svg/ directory, and convert each layer to JSON in the json/ directory.

Uploading

The script in upload.js can be used to push complete building objects into the mongo database.

  1. Clone and setup the main mapping app in a separate directory.
  2. Start the mapping application with docker-compose up
  3. In this directory, run npm run upload

Compatibility

This script uses the fs.Promises API, which requires node >= 10.0.0.

About

A quikie script to conver dxf ==> svg/json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published