How to convert a DWG to GeoJSON: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
| Verify that features from different layers have at least some differentiating attributes or values. | | Verify that features from different layers have at least some differentiating attributes or values. | ||
| [[How to export a GeoJSON from QGIS|Export the GeoJSON]]. | | [[How to export a GeoJSON from QGIS|Export the GeoJSON]]. | ||
}} | |||
{{gallery | |||
| dwg import option.jpg | The DWG import option in QGIS | |||
| dwg import window.jpg | The DWG import screen in QGIS | |||
}} | }} | ||
Revision as of 10:06, 19 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:
- Open QGIS
- Go to Project -> Import/Export -> Import Layers from DWG
- A DWG/DXF Import window will appear
- 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.
- For the CRS, select the Coordinate Reference System the DWG is in
- For the Source Drawing, select the DWG file
- 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
- At the bottom of the window, select "Merge layers" to group all intended layers together into one layer.
- Select "OK". This will complete the import and close the DWG/DFX Import window.
- In QGIS proper, right-click the created layer(s) and opt to show the attribute table.
- Verify that the features in the layer(s) have the correct data/attributes related to them
- Verify that features from different layers have at least some differentiating attributes or values.
- 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.