# dxf2json **Repository Path**: xiaoma12634/dxf2json ## Basic Information - **Project Name**: dxf2json - **Description**: convert dxf file into json or geojson format - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 0 - **Created**: 2021-12-29 - **Last Updated**: 2023-01-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # dxf2json [![NPM version][npm-image]][npm-url] [![NPM downloads][downloads-image]][downloads-url] [![Build status][travis-image]][travis-url] convert dxf file into json or geojson format ## Getting started ```shell npm install dxf2json --save ``` ```javascript const fs = require('fs') const { DxfParser, toGeojson } = require('dxf2json') new DxfParser().init('./sample/file2.dxf' , 'out.json') .then(result=>{ return result }) const content = fs.readFileSync('./sample/file2.dxf', 'utf-8') new DxfParser().parseContent(content) .then(result=>{ return toGeojson(result) }) ``` references: * [dxftojson](https://www.npmjs.com/package/dxftojson)