Skip to content

The purpose of this project is to develop a tool capable of converting CAD files (DXF and DWG) into GIS formats. A key objective is to allow the export of files by layer without requiring special processing for block elements.

Notifications You must be signed in to change notification settings

skyflying/CAD_to_GIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAD to GIS

It is a Python-based desktop application for converting CAD DXF files into GIS formats (Shapefile, GeoPackage). It provides an easy-to-use graphical interface for scanning layers, selecting which layers to export, and handling CAD blocks either exploded or preserved (merged) before conversion.


✨ Features

  • Fast layer scanning with entity count per layer
  • Layer selection UI with Select All and Clear All buttons
  • Block handling modes:
    • explode – break blocks into individual entities
    • keep-merge – preserve blocks and merge into single geometries
  • Precise coordinate transformation with source & target EPSG codes
  • Supports multi-layer output – each layer saved as a separate Shapefile or GeoPackage layer
  • Detailed logging with entity counts, progress, and final output list
  • Runs as standalone executable (via PyInstaller)

📦 Installation

You can run the app from source or download a packaged executable.

1. From Source

Requirements (Python 3.9+ recommended):

pip install pyside6 geopandas shapely fiona pyproj pandas ezdxf

Run the app:

python dxf2gis_gui/app.py

From Executable (Windows)

🚀 Usage

  1. Open a DXF file
  • Click "Browse" to select a DXF file.
  • Layers will be scanned and listed in the left panel.
  1. Select output location
  • Choose a folder for Shapefile output (.shp) or a GeoPackage file (.gpkg).
  1. Choose output driver
  • ESRI Shapefile or GPKG.
  1. Set coordinate system
  • Enter Source EPSG (default 3826) and optionally a Target EPSG.
  1. Select block handling mode
  • explode or keep-merge.
  1. Select layers
  • Pick specific layers or use Select All / Clear All buttons.
  1. Convert
  • Click "Convert" to start. Progress and logs will be shown in the right panel.

image

About

The purpose of this project is to develop a tool capable of converting CAD files (DXF and DWG) into GIS formats. A key objective is to allow the export of files by layer without requiring special processing for block elements.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published