[QGIS-trac] [Quantum GIS] #2989: improve reading of DWG to equal DNG
functionality
Quantum GIS
qgis at qgis.org
Wed Sep 8 11:31:30 EDT 2010
#2989: improve reading of DWG to equal DNG functionality
------------------------------------------------+---------------------------
Reporter: dcarreira | Owner: jef
Type: enhancement | Status: new
Priority: major: does not work as expected | Milestone: Version 1.6.0
Component: Vectors | Version:
Keywords: dwg, dgn, cad | Platform_version:
Platform: Windows | Must_fix: No
Status_info: 0 |
------------------------------------------------+---------------------------
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:
[[BR]]
"Type" IN ('3','4','12','14','16','15')
[[BR]]
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:[[BR]]
http://www.gdal.org/ogr/drv_dgn.html
[[BR]]
http://www.gisdevelopment.net/technology/gis/techgi0011.htm
[[BR]]
I attached an example dgn file where you can exercise this kind of
filtering.
[[BR]]
You can also by this means, get all text elements:[[BR]]
"Type" = '17'[[BR]]
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!
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2989>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list