Skip to content
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

Merged
merged 2 commits into from
Apr 22, 2018
Merged

Add "DWG/DXF Import..." description #2430

merged 2 commits into from
Apr 22, 2018

Conversation

DelazJ
Copy link
Collaborator

@DelazJ DelazJ commented Mar 13, 2018

Fixes #1579

Copy link
Member

@SrNetoChan SrNetoChan left a 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?
Copy link
Member

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.

Copy link
Member

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.

Copy link
Collaborator Author

@DelazJ DelazJ Mar 14, 2018

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?

Copy link
Member

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
Copy link
Member

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?

Copy link
Member

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
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SrNetoChan correct.

Copy link
Collaborator Author

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
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing * ?

Copy link
Collaborator Author

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.

Copy link
Member

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,
Copy link
Member

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.

@DelazJ
Copy link
Collaborator Author

DelazJ commented Mar 14, 2018

Thanks for your reviews

Copy link
Collaborator Author

@DelazJ DelazJ left a 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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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)?

Copy link
Member

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.

Copy link
Collaborator Author

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.

@DelazJ
Copy link
Collaborator Author

DelazJ commented Apr 6, 2018

Status?
I'll open bug report for what look like issue to me and let undocumented the behavior I do not understand

@DelazJ DelazJ merged commit ae6f29f into qgis:master Apr 22, 2018
@DelazJ DelazJ deleted the dxf branch April 22, 2018 11:00
DelazJ added a commit to DelazJ/QGIS-Documentation that referenced this pull request Apr 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants