-
-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "DWG/DXF Import..." description #2430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few suggestions. At some point it's good to add a warning saying that the import into Geopackage may take some time, depending on the size of the CAD file.
@@ -363,9 +363,34 @@ to the project. Layers are added with random style properties. | |||
.. need to be tested with dwg. How does dwg format behave when added to QGIS? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK, dwg are not readable using normal loading mechanism.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GDAL now has a opencad driver that reads DWG - but reading through OGR will not address symbology alike.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jef-n, is it in the minimal version required for 3.0. I mean, could we say that dwg can be opened in 3.0 or should this statement be conditioned by a GDAL version? which one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, DWG import was introduced in 2.18. And our DWG import is independant of GDAL's DWG support (which didn't exist when the QGIS' DWG import was implemented; QGIS DWG support aims to also reproduce the symbology and layer structure from *CAD; importing via GDAL would only produce simple points, lines, polygons)
@@ -363,9 +363,34 @@ to the project. Layers are added with random style properties. | |||
.. need to be tested with dwg. How does dwg format behave when added to QGIS? | |||
|
|||
To keep the dxf/dwg structure and its symbology in QGIS, you may want to | |||
use the dedicated :menuselection:`DWG/DXF Import...` tool. | |||
use the dedicated :menuselection:`Project --> DWG/DXF Import...` tool. Indeed, | |||
the :guilabel:`DWG/DXF Import` dialog offers you to import in a GeoPackage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows you to import into a GeoPackage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imports into GeoPackage
* Then use the **[Import]** button to select the DWG/DXF file to use (one per | ||
geopackage). The GeoPackage database will be automatically populated with the | ||
drawing file content. | ||
* The |checkbox| :guilabel:`Expand block references` helps you copy the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about this. AFAIK, blocks are groups of elements that can be repeated through the drawing. I would expect that the expand blocks would transform the existing blocks into normal elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SrNetoChan correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could someone come with a text, please? I'm far from CAD for maaannny years now and just pick the description from the "commit" help message #1580 (comment) (btw, really great to ease writers work. Thanks)
drawing file content. | ||
* The |checkbox| :guilabel:`Expand block references` helps you copy the | ||
transformed contents of the corresponding block for each block reference. | ||
* the |checkbox| :guilabel:`Use curves` promotes the layers geometry type to a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output layers?
another group for each of the selected layers in the list. Each subgroup | ||
contains vector layers for the point, line, label and area features of the | ||
respective layer. The style of each layer is setup so that it resembles the look | ||
it originally had in *CAD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing * ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Picked from aforementioned description (i guess it was instead targeting softwares like LibreCAD, AutoCAD... ). Simply forgot that * is a special character and Travis would not like it.
Will change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to escape the *. I think \* will do
After the :file:`.dwg` or :file:`.dxf` data is imported into the GeoPackage | ||
database the list in the lower half of the dialog is populated with the layer | ||
list from the imported file. There you can select which layers to import into | ||
the QGIS project. A top level group is set for the drawing file and inside, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make a reference to the Group name label.
Thanks for your reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the requested changes but i'm not sure I really understand how this dialog is organized (and there's UX issue here imho - see inline comment ).
Also I could not understand what the "reload" button does: update the list of layers, reload the cad file, load again to the db, all of them? And at the same time what do the "import" and "load layers" button?
Maybe should I raise this in the issue tracker (but in case I missed something...)
* Specify which coordinate system the data in the DWG data is in; | ||
* Then use the **[Import]** button to select the DWG/DXF file to use (one per | ||
geopackage). The GeoPackage database will be automatically populated with the | ||
drawing file content. Depending on the size of the \*CAD file, this could |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the automatic import is a UX killer: select the wrong CAD file and you have to wait for a long time: i think people expect to first add the cad layer (btw we should use qgsfilewidget for both data loader) and then consciously choose to import into the db.
layers from the imported file. There you can select which layers to add to the | ||
QGIS project: | ||
|
||
* At the top, set a :guilabel:`Group name` to group the drawing files in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it required to add a group name (ok is disabled until set)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the layers from the DWG appear in a group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I saw that. My point was why do we require they are added in a group. layers are already added to their own group and now those groups are also added in a "bigger" group. Too many groups, no?
People can easily identify layers that come from the gpkg file. No need for a group (or at least, it should not be mandatory) imho. That said, this is the less puzzling feature in the dialog to me.
Status? |
(cherry picked from commit ae6f29f)
Fixes #1579