Feature request #2989

improve reading of DWG to equal DGN functionality

Added by dcarreira - over 13 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Low
Assignee:Jürgen Fischer
Category:Vectors
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:13049

Description

QGIS already reads DGN files (at least v7), mixing all geometry types in one single layer.

One can then filter each geometry type by querying the dgn layer. For example, to filter all lines you can use this query:

"Type" IN ('3','4','12','14','16','15')

The layer will have only lines after this query is applyed. To know which type codes correspond to each geometry type you can lookup on certain web pages, like:

http://www.gdal.org/ogr/drv_dgn.html

http://www.gisdevelopment.net/technology/gis/techgi0011.htm

I attached an example dgn file where you can exercise this kind of filtering.

You can also by this means, get all text elements:

"Type" = '17'

Note that QGIS does not reset the symbology according to the query results. So the default line symbology is kept and nothing is visible since the layer now holds only points. To workaround this limitation, you have only to change the symbology type to "Categorized", and then back to "Single Symbol". QGIS will pick up on the geometry type and propose the default point symbol. At this stage you can see the text points.

Since all DGN attributes that are captured by OGR are available to QGIS you can also show the texts by labeling the points.

Finally, you can export each geometry type to separate shapefiles. Later on, you can work these shapefiles and further filter elements by level (the dgn's equivalent to dwg's layers).

This process allows QGIS to work with CAD data directly, without requiring external tools, like ogr2ogr. Extending this support to dwg would be a breakthrough!

0243-P0140-04.7z - dgn example file (198 KB) dcarreira -, 2010-09-08 08:36 AM

History

#1 Updated by Paolo Cavallini about 13 years ago

  • Resolution set to wontfix
  • Status changed from Open to Closed

DWG is a proprietary format. No free and open source software can read it effectively. DXF, on the other hand, is supported through OGR.

#2 Updated by Jürgen Fischer almost 7 years ago

  • Resolution changed from wontfix to fixed/implemented
  • Pull Request or Patch supplied set to No
  • Description updated (diff)
  • Subject changed from improve reading of DWG to equal DNG functionality to improve reading of DWG to equal DGN functionality

Also available in: Atom PDF