Open cxcandid opened 3 months ago
CC @atlight
This would be reasonably straightforward to add. You would write a function to OGRDXFWriterLayer that is called from each of the Write*
functions. The new function would validate the RawCodeValues
list (ensure it has an even number of values and values at position 0, 2, ... are integers) and writes the entries out to the file line by line.
I'm unlikely to find time to develop this, but it should be straightforward enough for anyone with basic C++ knowledge. The only GDAL-specific thing is iterating through the StringList. I'd be glad to review a pull request.
A small note on RawCodeValues
validation. There is a mandatory application name (code 1001) that has to be registered in the AppID
section of the DXF. Extended Entity Data is limited to 16K per entity. And there are multiple group codes for different data types (i.e. String, Int, Real). More info here: https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-A94BC605-5517-437F-A6FE-D3EB8116A01A
Feature description
When we use
ogr2ogr
to convert a DXF file to a format that natively supportsStringList
type for fieldRawCodeValues
(i.e. GeoJSON) , we can export all AutoCAD Extended Entity Data (EED), if we set--config
optionDXF_INCLUDE_RAW_CODE_VALUES=TRUE
. Unfortunately, the reverse does not work. We cannot write EED that is stored inRawCodeValues
back to DXF.I guess, it shouldn't be too difficult to write this data back.
Additional context
No response