OSGeo / gdal

GDAL is an open source MIT licensed translator library for raster and vector geospatial data formats.
https://gdal.org
Other
4.94k stars 2.57k forks source link

[DWG] Dwg Driver does not support polygons reading #4535

Closed lchevallier69 closed 2 years ago

lchevallier69 commented 3 years ago

Expected behavior and actual behavior.

When i read a DWG with DWGDriver (GDAL Compiled with ODA), AcDbFace and AcDbRegion are ignored, in fact, a lot of DWG files contain those type of object. In the reader there are nothing to read polygons present in the dwg. I would like to convert also AcDbRegion and AcDbFaces to Ogr Polygons

Steps to reproduce the problem.

Create a DWG with faces or regions, the launch this command line ,

ogrinfo.exe C:\Users\fkouadjosse\Downloads\Luc\Modele_intraSITE.dwg entities --debug ON

the output does not contains any polygon and the output explains that AcDbFace or AcDbRegion are ignored.

Operating system

Windows 10 64 bit & Linux Ubuntu 16.04 64 bit

GDAL version and provenance

GDAL 3.2 on Ubuntu & 3.0.4 on Windows

Clipboard - 22 septembre 2021 09_21 1

rouault commented 3 years ago

Please attach a file that demonstrates the issue

lchevallier69 commented 3 years ago

image Green shapes are faces

lchevallier69 commented 3 years ago

image this rounded wall is a region

lchevallier69 commented 3 years ago

both types are ignored by the DWG driver

lchevallier69 commented 3 years ago

sample_face_region_dwg.zip

atlight commented 3 years ago

Just noting here that the GDAL DXF driver can process AcDbFace (3DFACE) entities. You may wish to use a tool such as the ODA File Converter to transform your DWG files into DXF.

The format of AcDbRegion entities is proprietary. Open-source software will likely never be able to interpret these entities.

lchevallier69 commented 2 years ago

right for AcDbRegion, lets read AcDbFace, i'll make a pull request for that