[Qgis-psc] Proposal that QGIS.ORG will become a member of the OpenDesign Alliance

Saber Razmjooei saber.razmjooei at lutraconsulting.co.uk
Thu Dec 17 09:20:43 PST 2015


Hi Andreas,

Apologies, wrong use of ogr ...I meant a QGIS layer...can be any format as long as the features you listed are supported.

Yes, I did participate and the summary you provided is my understanding too. I am just highlighting the steps required to properly read a dxf/dwg files in QGIS. My proposed approach would be:

Step 1: Create a tool/plugin...to read DXF and all its associated features correctly in QGIS. The output can be a plugin layer, spatialite, etc. But it will have to support style, curve, etc
Step 2: Add support for DWG files using a 3rd party library

>From my point of view, reading DWG directly is not a very urgent part of this work. There are other tools already doing a good work of converting DXF <> DWG and in my experiend DWG=DXF.

Hope it is clearer now.

Thanks,
Saber

-----Original Message-----
From: Andreas Neumann [mailto:a.neumann at carto.net] 
Sent: 17 December 2015 17:06
To: Saber Razmjooei; qgis-psc at lists.osgeo.org
Cc: 'Sandro Santilli'; vincent.ml at oslandia.com
Subject: Re: [Qgis-psc] Proposal that QGIS.ORG will become a member of the OpenDesign Alliance

Hi Saber,

But why do this extra conversion step if we can read dxf or dwg directly? We also don't need OGR in between - OGR has a limited set of feature styles, which doesn't solve our needs. We should read the CAD files directly. Note that neither shape, nor spatialite are meant to store or transport styling.

In June 2015 I invited everyone to participate in working on a requirements document for reading CAD files (https://lists.osgeo.org/pipermail/qgis-user/2015-June/032503.html). 
Even you, Saber, participated on this requirements document. I thought we have come to a consensus how to approach the problem.

There were also repeated discussions to retire the dxf2shp plugin, because it caused troubles, crashes in some QGIS versions and has a lot of limitations (most notably styling and labels).

I can totally understand the reservation against Teigha, esp. if we can find an alternative. But why are we now discussion converting everything through an intermediate format that isn't meant to transport styling?

Greetings,
Andreas

On 17.12.2015 17:48, Saber Razmjooei wrote:
> Hi Andreas,
>
> There are 2 problems to tackle:
> 1 - File conversion: DWG is a proprietary format and difficult to work with. In an ideal scenario and as far as I know, there is no difference between a DWG file and its equivalent DXF format (similar to Mapinfo TAB and MID/MIF the former binary and the latter ascii equivalent, including style, geometry, attribute table, etc).
>
> 2 - Reading DXF properly in QGIS: with all the problems you listed below and not addressed properly with the current DXF2SHAPE plugin.
>
> You can obviously do the conversion directly in step 1 from DWG to an ogr format without having an intermediate DXF format, once you have all the features developed in step 2.
>
> I think most of the features you listed are independent of DXF/DWG/DGN formats. We can even start with a dxf 2 spatialite and have all the features below. Most of users will be able to export (e.g. from AutoCAD) or convert (e.g. Teigha) their drawings  to DXF and then read it with the DXF reader in QGIS.
>
> In future, integrating libdxfrw or other libraries to handle DWG/DGN files. It will split the development to 2 phases and will reduce the risk significantly.
>
> Kind regards,
> Saber
>
>
>
> -----Original Message-----
> From: Andreas Neumann [mailto:a.neumann at carto.net]
> Sent: 17 December 2015 16:09
> To: Saber Razmjooei; qgis-psc at lists.osgeo.org
> Cc: 'Sandro Santilli'; vincent.ml at oslandia.com
> Subject: Re: [Qgis-psc] Proposal that QGIS.ORG will become a member of 
> the OpenDesign Alliance
>
> Hi Saber,
>
> The dxf2shape plugin is a current possible workaround, but far from ideal. Definitely what we want to use in the future.
>
> The problems that come to my mind are:
> - you loose all styling
> - you loose text labels
> - you have to manually restyle stuff (if you still can)
> - you have to go through this nasty old file format "ESRI shape" that 
> we really want to retire soon
> - no curve support
> - it is complicated and more time consuming
> - there are probably even more drawbacks and problems that don't come 
> to my mind immediately, regarding this approach
>
> I would not recommend to invest in the dxf2shape plugin, but rather 
> have a more direct provider that provides more information about the 
> CAD objects, such as built around libdxfrw or Teigha (please don't 
> stone me to death if I still list Teigha as an alternative ;-) ...)
>
> Andreas
>
> On 17.12.2015 15:35, Saber Razmjooei wrote:
>> Hi all,
>>
>> My workflow so far for dealing with DWG files have been:
>> - Using Teigha File Converter to convert DWG files to DXF (a binary 
>> tool distributed for free by OpenDesign to convert DWG/DXF formats)
>> - In QGIS, using DXF2Shape to convert dxf files to vector consumable 
>> in QGIS
>>
>> The problem with Dxf2Shape is that the converted vector file does not include symbology, text and other info on the spec document sent earlier by Andreas.
>>
>> After Sandro's email, I have downloaded and compiled the code for libdxfrw. Using the dwg2dxf tool from libdxfrw, I then converted my 2015 DWG CAD file to dxf.
>> I had some problems opening the resultant DXF in TrueView (AutoCAD file viewer) but managed to successfully use DXF2SHAPE to convert the file and read it in QGIS.
>>
>> To summarise, in my opinion, it will be best to:
>> - embed libdxfrw library to convert DWGs to DXF behind the scene. If necessary, improve the library to handle complex DWG files.
>> - improve DXF2Shape plugin...or if needed re-develop  a new tool to 
>> handle DXF files
>>
>> Hope that helps.
>>
>> Regards,
>> Saber
>>
>>
>>
>>    
>>
>> -----Original Message-----
>> From: Qgis-psc [mailto:qgis-psc-bounces at lists.osgeo.org] On Behalf Of 
>> Sandro Santilli
>> Sent: 16 December 2015 16:46
>> To: Andreas Neumann; vincent.ml at oslandia.com; 
>> qgis-psc at lists.osgeo.org
>> Subject: Re: [Qgis-psc] Proposal that QGIS.ORG will become a member 
>> of the OpenDesign Alliance
>>
>> UPDATE: it looks like libdxfrw (used by LibreCAD) has been made GPL2+:
>> https://sourceforge.net/p/libdxfrw/code/ci/master/tree/
>> It's documented to be able to read up to 2015  version of DWG files.
>>
>> Thread here:
>> https://sourceforge.net/p/libdxfrw/discussion/general/thread/6d9d288c
>> /
>>
>> --strk;
>>
>> On Wed, Dec 16, 2015 at 02:24:10PM +0100, Sandro Santilli wrote:
>>> On Wed, Dec 16, 2015 at 01:54:38PM +0100, Andreas Neumann wrote:
>>>> Hi Strk,
>>>>
>>>> So why aren't FreeCAD, LibreCAD, Blender and Inkscape using 
>>>> LibreDWG? As far as I understand, it is because some of their other 
>>>> components/libraries are GPLv2 only and thus they can't mix? I 
>>>> can't claim that I understand all of these licensing issues. But 
>>>> apparently, for some reasons the majority of the LibreGraphics 
>>>> software cannot use LibreDWG. This is what the say at their
>>>> websites:
>>>>
>>>> http://freecadweb.org/wiki/?title=Licence#GPL2.2FGPL3.2FOCTLP_incom
>>>> p
>>>> atibility
>>>> https://en.wikipedia.org/wiki/LibreCAD#GPLv3_vs_GPLv2_controversy
>>> So it looks, but those articles don't state clearly which 
>>> dependencies are GPL2-only so I cannot easily check if that's still the case.
>>>
>>>> Apparently LibreCAD created their own library, which is available 
>>>> at http://sourceforge.net/projects/libdxfrw/
>>> And they made it GPL2-only. That's a bad move really :(
>>>
>>>> About the funding drive: this funding drive is about the Free 
>>>> Software Foundation (FSF) in general, not for the LibreDWG project, 
>>>> unfortunately. You can find the same funding drive on 
>>>> http://www.gnu.org/ and other GNU websites. Unfortunately, FSF, 
>>>> doesn't treat LibreDWG as a priority project.
>>> Oops, you're right. Sorry for the confusion.
>>>
>>>> So basically, GRASS is the only piece of software using LibreDWG - 
>>>> according to 
>>>> https://libreplanet.org/wiki/Group:LibreDWG#Who_uses_it.3F
>>>> because the information about LibreCAD is outdated.
>>> That seems to be the case, yes.
>>>
>>> --strk;
>> _______________________________________________
>> Qgis-psc mailing list
>> Qgis-psc at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-psc
>>
>>
>> --
>> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.
>> If you have received this email in error please notify the system 
>> manager. This message contains confidential information and is 
>> intended only for the individual named. If you are not the named 
>> addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
>>
>> Whilst reasonable care has been taken to avoid virus transmission, no 
>> responsibility for viruses is taken and it is your responsibility to carry out such checks as you feel appropriate.
>>
>> If this email contains a quote or offer to sell products, carry out work or perform services then our standard terms and conditions (which can be found at http://www.lutraconsulting.co.uk/downloads/Lutra%20Consulting%20Standard%20Terms%20and%20Conditions.pdf shall apply unless explicitly stated otherwise.
>>
>> Saber Razmjooei and Peter Wells trading as Lutra Consulting.
>





More information about the Qgis-psc mailing list