Ticket #3393 (closed defect: fixed)
DXF Doesn't identify polygons correctly
|Reported by:||gaige||Owned by:||warmerdam|
Description (last modified by warmerdam) (diff)
There is a test in the OGRDXFWriterLayer::WritePOLYLINE function that is intended to identify a linear ring. Unfortunately, due to the fact that wkbLinearRing is never returned by linear rings, it always sees it as a wkbLineString, which means that polygons are always written as lines, and not closed figures (which is to say that attribute 70 is always set to 0).
Replacing this test with the "standard"
if( EQUAL( ((OGRGeometry*) hGeom)->getGeometryName(), "LINEARRING" ) )
test fixes the problem.