OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
820 stars 302 forks source link

[Feat] Switch from OpenDWG toolkit to libredwg to allow work with DWG in practice #2819

Open mmokrejs opened 1 year ago

mmokrejs commented 1 year ago

In https://bugs.gentoo.org/show_bug.cgi?id=893134 Mario figured out why Gentoo Linux cannot enable DWG support due to missing OpenDWG package. Please try to switch to libredwg. It takes quite some effort to figure out why DWG cannot be imported if QGIS in general claims it can do that. This happens as of current sci-geosciences/grass-8.2.0-r4.

nilason commented 1 year ago

Support for dxf/dwg could most probably be greatly improved with GRASS.

It is the configure option --with[out]-opendwg is what ends up in the configure result list:

GRASS is now configured for:  x86_64-pc-linux-gnu
...
DWG support:                [no/yes]
...

That does not mean there is no support at all. Presently, there is an addon v.in.redwg which is using libredwg. In addition, v.in.ogr enables (limited) reading support (https://gdal.org/drivers/vector/cad.html).

There is no direct connection between QGIS ability to handle dwg files and the configuration of GRASS. (An imported dwg in QGIS in the form of a geopackage file, might be used in GRASS though).

Side note: if I'm not mistaken QGIS uses an embedded version of libdxfrw.

lbartoletti commented 1 year ago

Side note: if I'm not mistaken QGIS uses an embedded version of libdxfrw.

Yes, but only to convert DWG to GPKG.

To open a DWG as a "normal" vector, QGIS uses GDAL "thanks" to libopenca. However, this lib can only open DWG 2000.

DWG is a proprietary format and there is no real solution (maybe libdxfrw is the less bad :/).

As possible, use DXF.