This article describes how to use QGIS to convert CAD Files (DWG/DXF) into four GIS spatial formats: Shapefile, GDB, GeoJSON, and GeoPackage. It also describes how to convert propagation model raster output into a vector format.
CAD to Shapefile
Note: Plugins can be installed directly from the QGIS Plugin Manager within the QGIS application.
|
- First convert the DWF/DXF file into a GeoPackage format using the CAD to GeoPackage instructions below. The GeoPackage will contain the layer or layers needed.
- The layers created within the GeoPackage can be extracted and used as shapefiles.
- Run the QPackage Plugin.
- Select the desired layers within the Geopackage.
- Export them as shapefiles.
|
CAD to GDB
Note: You must have installed QGIS through the OSGeo4W installer and have “OGR FileGDB Driver” checked within the “Libs” menu.
Note: Natively, a GDB cannot be edited in QGIS, as it will be read-only. The user must install the GDAL Vector driver FileGDB, which provides read and write access to vector layers of File Geodatabases (.gdb directories) created by ArcGIS 10 and above.
|
- First convert the DWF/DXF file into a GeoPackage format using the CAD to GeoPackage instructions below.
- Once the Geopackage is created, extract the layers.
- Add the layers to the display and right-click the layer in the Layers panel, Select “Export”select “Save Features As...”
- A window will appear where the format can be chosen. Choose ESRI FileGDB.
- Browse where the output file will be saved.
- Select the desired feature dataset.
- Click Ok, and the new GDB file should appear in the display.
|
CAD to GeoJSON |
- First convert the DWF/DXF file into a GeoPackage format using the CAD to GeoPackage instructions below.
- Extract the desired layers from the newly created GeoPackage.
- Ensure that the coordinate reference system is correct.
- Right click the shapefile in the Table of Contents and select Save As.
- Browse the options and select the format as GeoJSON.
- Select the CRS button and select the appropriate projected coordinate system.
- Click Ok, and a single GeoJSON file should be generated.
|
CAD to GeoPackage
Note: A single GeoPackage file can contain various data types (both vector and raster) in different coordinate reference systems, as well as tables without spatial information.
|
- Open QGIS and select Project → DWG/DXF Import Tool.
- Within the dialogue, specify the location of where the GeoPackage will be located.
- Specify what coordinate system used by the data.
- Select the source drawing (the DWG file that is being imported).
- Choose with attributes to carry over into the GeoPackage.
- Click Ok, and the drawing should appear on the display as a collection of layers in the table of contents.
|
Propagation Model Output
Propagation modeling software may produce data in different formats. Here we describe how to convert raster output from the software into a vector format using ArcMap. The BDC system accepts four vector GIS formats: Shapefile, GDB, GeoPackage, and GeoJSON.
Note: For BDC, the raster data output from the propagation model software must be 100m resolution or finer. The maximum size of the raster bins is 100m by 100m.
|
- Open QGIS and locate the Raster Pixels to Polygons tool.
- When the tool dialog window appears, select the raster layer, band number, field name, and the output vector file.
- Click Run, and the vector layer output will be created.
|
For more information, see the QGIS User Guide at https://docs.qgis.org/3.16/en/docs/user_manual/