https://issues.qgis.org/https://issues.qgis.org/favicon.ico2013-05-26T10:05:20ZQGIS Issue TrackingQGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412292013-05-26T10:05:20ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li><li><strong>File</strong> <a href="/attachments/download/5779/test.tar.gz">test.tar.gz</a> added</li></ul><p>on QGIS master it gives error while exporting to shape, but it gives also a result (attached). Please try and report back. Cheers.</p>
<p>Export to vector file failed.<br />Error: Feature write errors:<br />Feature creation error (OGR error: Attempt to write non-linestring (POINT) geometry to ARC type shapefile.)<br />...<br />Feature creation error (OGR error: Attempt to</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412382013-05-26T20:15:25ZJohn Sankey
<ul><li><strong>File</strong> <a href="/attachments/download/5783/OAK_VALLEY_A1_Drawing-Model.pdf">OAK_VALLEY_A1_Drawing-Model.pdf</a> added</li><li><strong>File</strong> <a href="/attachments/download/5784/ovpp.gif">ovpp.gif</a> added</li></ul><p>DXF can contain points, lines and polygons - this one comes from an AutoCAD user. (So can WKT, which I also tried to use for another user's maps earlier - see <a class="issue tracker-1 status-5 priority-4 priority- closed" href="https://issues.qgis.org/issues/7703" title="WKT import two problems (Closed)">#7703</a>.) QGIS needs to creat three layers for this DXF, one pont, one line, one polygon. It doesn't, and that's why it fails. This is not only a bug, but a blocker for bringing in these AutoCAD maps. I attach a PDF from the user showing what the result should look like, also a GIF of what I get in QGIS 1.8 with this file.</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412402013-05-26T22:46:43ZAlessandro Cialialessandro.ciali@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/5785/OAK.zip">OAK.zip</a> added</li></ul><p>I tried to import the dxf file as it is, obtaining the same error. but, performing the following feature subset:<br />"SubClasses" = 'AcDbEntity:AcDbLine' OR "SubClasses" = 'AcDbEntity:AcDbPolyline' OR "SubClasses" = 'AcDbEntity:AcDbCircle' OR "SubClasses" = 'AcDbEntity:AcDbCircle:AcDbArc'<br />and then saving layer as shape, I obtained the polyline shape attached.<br />Performing a feature subset:<br />"SubClasses" = 'AcDbEntity:AcDbText' <br />In order to isolate the only text features, I was able to correctly represent text in QGIS, but when I tried to export the layer as shape, I was prompted by:
|Export to vector file failed.
|Error: Feature write errors<br />reported in your previous messages. It seems that QGIS tries to import text layer in a line shape:
|Feature creation error (OGR error: Attempt to write non-linestring (POINT) geometry to ARC type |shapefile.)<br />regardless of text layer feature type (point, see the project attached); this can be the problem.<br />BTW, I can't open the dwg file in autocat (autocad LT 2009), so check the Autocad version, It could be an unsupported one.<br />Please, give a feedback so that we can refine the problem</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412452013-05-27T02:55:07ZJohn Sankey
<ul><li><strong>File</strong> <a href="/attachments/download/5788/OAK_VALLEY_Drawing.dwg">OAK_VALLEY_Drawing.dwg</a> added</li></ul><p>I've asked the user for his version. In the meantime, here is the native DWG of AutoCAD.<br />The drawing was originally in Drafix CAD - it was bought by AutoCAD and shut down; the user migrated to AutoCAD Lt 2008 which is what has produced his DWG and DXF.</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412562013-05-27T05:06:24ZAlessandro Cialialessandro.ciali@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/5791/OAK_VALLEY_Drawing_text2.zip">OAK_VALLEY_Drawing_text2.zip</a> added</li></ul><p>I exported the DWG to dxf2000 version. I exported then to shp without problem (see attached shape).<br />The problem was surely related to dxf version. Used QGIS current master, but it works the same with 1.8</p>
<p>In order to correctly export dxf layer to shape, I suggest to follow these steps:</p>
<p>1. open dxf in QGIS;<br />2. make a feature subset depending on type of feature you are interested (then, you have to reset the symbology type (point, line, area), maybe it could not be the right one);<br />3. Save as the layer</p>
<p>I think that you can close this ticket.</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412572013-05-27T06:10:58ZJohn Sankey
<ul></ul><p>Alessandro, how do I do step 2 within a DXF layer? (With 1700+ features, it can't be one by one...)</p>
<p>Also, when I save-as there is no option to set SHP type to point,line or polygon - I can only do that when I create a new SHP.</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412582013-05-27T07:31:39ZAlessandro Cialialessandro.ciali@gmail.com
<ul></ul><p>1. About step 2: in layer properties you can find Feature subset. You have not to do one by one, but define a query on "Subclasses" field of dxf layer like:
|"SubClasses" = 'AcDbEntity:AcDbLine'<br />2. There is no option to set SHP type on save as, the type is automatically determined on the type of feature you are saving. That's why you have to make a subset query on the feature type before save.</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412642013-05-27T14:31:37ZJohn Sankey
<ul></ul><p>Alessandro, I can't find anything about this in the user manual. I tried the exact phrase you quote and it wiped out many of the lines as well as all points and labels. What are the subclass statements for Polygons, Points, multiline, multipoint etc.? And, how do I get labelled points, which are most of the features on this map?</p>
<p>This is definitely a workaround method, not one that should be considered as final in a stable version of QGIS...</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412692013-05-27T21:50:42ZAlessandro Cialialessandro.ciali@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/5792/OAK2.zip">OAK2.zip</a> added</li></ul><p>Hi jhon, the user manual does not contain anything about this because this is a workaround that I use for representing CAD drawing in QGIS. I found this way through some attemps. I attached a QGIS project, you have only to reconnect the dxf you find to the project. See how I have represented the different layers (based from different subclesses of the same dxf file).</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412702013-05-27T21:53:21ZGiovanni Manghigiovanni.manghi@gmail.com
<ul></ul><blockquote>
<p>This is definitely a workaround method, not one that should be considered as final in a stable version of QGIS...</p>
</blockquote>
<p>There are well known issues around DXF files, please see</p>
<p><a class="external" href="http://lists.osgeo.org/pipermail/qgis-developer/2013-February/024592.html">http://lists.osgeo.org/pipermail/qgis-developer/2013-February/024592.html</a></p>
<p>and add your notes. Cheers!</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=412982013-05-28T09:36:24ZJohn Sankey
<ul></ul><p>Hi all: please do not close this thread. Here's why:</p>
<p>Until very recently GIS systems were far too expensive for individual professionals - of course I thank all those working on QGIS for dramatically changing that. What it meant was that all of us involved in mapping looked for an affordable system, usually one we needed for other work, that allowed numeric data from field surveys to be entered. I started in the '60s with Fortran programs I wrote myself, and transitioned to the 1980's SigmaPlot when it became available. The output of many, such as SigmaPlot, can be converted with a script to WKT - but see <a class="issue tracker-1 status-5 priority-4 priority- closed" href="https://issues.qgis.org/issues/7703" title="WKT import two problems (Closed)">#7703</a> for my problems with that. The next person I tried used AutoCAD, which outputs in DWG (closed, proprietary i.e. useless for open source) and DXF; you can see here the problems with it. I'm certain the next user I try will use yet another available numeric-based system.</p>
<p>QGIS needs to work on dealing with these old ersatz methods to allow us all to move to the far superior control of output that a true GIS gives. But in particular, it needs to provide continuing solid support for numerical data from surveys - these continue to be produced by all surveyors.</p>
<p>WKT would probably be the most flexible if someone would be willing to work on it to make it solid, as it's easily written directly by anyone with survey data in hand - most of us keep our fieldbooks. My most recent user has his original survey data, so it might well be easier for me to rewrite it in WKT rather than deal with the uncertainties of unknown-vintage DXF or who knows what next format.</p>
<p>Many thanks all - I'll do my best to work with Alessandro's work.</p> QGIS Application - Bug report #7910: DXF file can't be saved as SHPhttps://issues.qgis.org/issues/7910?journal_id=529212014-06-21T22:54:10ZJürgen Fischerjef@norbit.de
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li><li><strong>Category</strong> set to <i>Vectors</i></li></ul>