[gdal-dev] How can I use RawCodeValues in DXF driver?

jlaegel jlaegel at gbi-info.de
Fri Jul 31 01:20:18 PDT 2020


Hello,

I create a new DXF file, and want to use the RawCodeValues field.
but I can't get it in the output DXF.

Procedure:
- MS-SQL-Server
- GDAL version 3.0.0

-a table on the SQL-Server with fields:
   layer AS nvarchar(max),
   RawCodeValues AS nvarchar(max),
   ogr_style AS nvarchar(max),
   blockname AS nvarchar(max),
   blockscale AS nvarchar(max),
   blockangle AS int,
   the_geom AS geometry

- input command line: (* replace the original input)

/ogr2ogr --config DXF_INCLUDE_RAW_CODE_VALUES TRUE -f DXF
C:\***\***\***\test.dxf -dsco
header=C:\ogr2ogr\gdal\bin\gdal-data\header.dxf -dsco
trailer=C:\ogr2ogr\gdal\bin\gdal-data\trailer.dxf
"MSSQL:server=**.**.**.**;driver=SQL Server;database=****;
Uid=***;Pwd=******; tables=dbo.*****(the_geom)"/

This procedure works itself for the DXF output with the values in
"ogr_style" or "blockname".
But the value in the tablefield "RawCodeValues" is ignored.

Example of SQL-Table content: (line geometry)
layer|RawCodeValues|ogr_style|blockname|blockscale|blockangle
test|43=1.0|PEN(c:#cecece)|NULL|NULL|NULL

In this example i need *constant width* in line geometry.
In DXF, the line is available with color #cecece, but without constant
width.

I have read that the content in "RawCodeValues" should be "code = value [,
code = value]*".

Is my content/syntax for RawCodeValues in the tablefield correct?

Or what do I have to set so the output with RawCodeValues works?

The "Pen Width" in "ogr_style" isn't an option for me, because that is the
weight in DXF and not all values are allowed.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list