How to convert a DWG to GeoJSON: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
(Created page with "{{stub}} {{editor steps|title=load a DWG file in QGIS| | Open QGIS | Go to Project -> Import/Export -> Import Layers from DWG | A DWG/DXF Import window will appear | For targ...")
 
No edit summary
Line 1: Line 1:
{{stub}}
{{stub}}
DWG, which is a CAD file, is an often used format for the design and exchange of urban development plants. However, as it is not an open standard, the {{software}} cannot import it directly. Instead, it is necessary to convert to a different format which can be imported.


{{editor steps|title=load a DWG file in QGIS|
{{editor steps|title=load a DWG file in QGIS|

Revision as of 07:51, 18 May 2022

This article is a stub.

DWG, which is a CAD file, is an often used format for the design and exchange of urban development plants. However, as it is not an open standard, the Tygron Platform cannot import it directly. Instead, it is necessary to convert to a different format which can be imported.

How to load a DWG file in QGIS:
  1. Open QGIS
  2. Go to Project -> Import/Export -> Import Layers from DWG
  3. A DWG/DXF Import window will appear
  4. For target package, select any location and name using the button with the 3 dots. This will create a file where the DWG data can be unpacked.
  5. For the CRS, select the Coordinate Reference System the DWG is in
  6. For the Source Drawing, select the DWG file
  7. A list of layers will appear
    Ensure that:
    • Only polygon layers are selected. No lines.
    • Only the layers you wish to include in your plan are selected
  8. At the bottom of the window, select "Merge layers" to group all intended layers together into one layer.
  9. Select "OK". This will complete the import and close the DWG/DFX Import window.
  10. In QGIS proper, right-click the created layer(s) and opt to show the attribute table.
  11. Verify that the features in the layer(s) have the correct data/attributes related to them
  12. Verify that features from different layers have at least some differentiating attributes or values.
  13. Export the GeoJSON.

Notes

  • The latest version of QGIS is verified to work with DWG versions up to DWG2013. Newer version may not load properly or at all.
  • To see whether the correct parts of the plan are included, do not select the "Merge Layers" option while importing the DWG. This will show features on their individual layers, making it easier to verify whether any and all correct data is selected. It is then possible to reimport the DWG into QGIS with the layers merged.