Feature request #2989

improve reading of DWG to equal DNG functionality

Added by dcarreira - over 4 years ago. Updated almost 4 years ago.

Status:Closed Start Date:
Priority:Low Due date:
Assigned to:J├╝rgen Fischer % Done:

0%

Category:Vectors
Target version:Version 1.6.0
Platform:Windows Resolution:wontfix
Platform version: Patch supplied:
Status info:0 Tag:

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 (197.6 kB) dcarreira -, 09/08/2010 08:36 am

History

Updated by Paolo Cavallini almost 4 years ago

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

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

Also available in: Atom PDF