[gdal-dev] How can I use RawCodeValues in DXF driver?
Alan Thomas
AThomas at thinkspatial.com.au
Sat Aug 8 05:58:37 PDT 2020
RawCodeValues is generated by the DXF reader. The DXF writer has no logic to handle this field.
Alan
-----Original Message-----
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of jlaegel
Sent: Friday, 31 July 2020 6:20 PM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] How can I use RawCodeValues in DXF driver?
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
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list