Opened 4 years ago

Closed 4 years ago

#5217 closed defect (fixed)

3D Linestring in geojson leads to corrupted dxf file

Reported by: renderflash Owned by: warmerdam
Priority: normal Milestone: 1.10.1
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: dxf
Cc:

Description

When converting a geojson with a 3D Linestring in it to a dxf file, the output seems to be corrupt (DWG TrueView? returns: Two vertices were added to a 2D pline (0) which had no vertices.). When converting the same geojson to a shapefile everything works perfectly. Command used: ogr2ogr -f "DXF" outfile.dxf infile.geojson I used the daily trunk snapshot from the 25th of august.

Attachments (6)

infile.geojson (460 bytes) - added by renderflash 4 years ago.
3D geojson Linestring to test with
ticket5217.patch (1.5 KB) - added by Even Rouault 4 years ago.
Proposed patch
out_after_ticket5217_patch.dxf (21.4 KB) - added by Even Rouault 4 years ago.
Result of conversion of infile.geojson with ticket5217.patch applied
out_after_ticket5217_v2_patch.dxf (21.4 KB) - added by Even Rouault 4 years ago.
Result of conversion of infile.geojson with ticket5217_v2.patch applied
ticket5217_v2.patch (1.5 KB) - added by Even Rouault 4 years ago.
Proposed patch v2
out_after_ticket5217_v3_patch.dxf (21.4 KB) - added by Even Rouault 4 years ago.

Download all attachments as: .zip

Change History (14)

Changed 4 years ago by renderflash

Attachment: infile.geojson added

3D geojson Linestring to test with

comment:1 Changed 4 years ago by Even Rouault

Might be linked with #5210

comment:2 Changed 4 years ago by Even Rouault

renderflash,

I've perhaps a fix. Could you test the attached out_after_ticket5217_patch.dxf that is the result of the conversion with with trunk + ticket5217.patch applied ?

Changed 4 years ago by Even Rouault

Attachment: ticket5217.patch added

Proposed patch

Changed 4 years ago by Even Rouault

Result of conversion of infile.geojson with ticket5217.patch applied

comment:3 Changed 4 years ago by renderflash

For the out_after_ticket5127_patch.dxf I now get the error: "The following error was encountered while reading in VERTEX starting at line 1566: Class separator for class AcDbEntity? expected"

comment:4 Changed 4 years ago by Even Rouault

Hum, ok I'm attaching a new attempt as out_after_ticket5217_v2_patch.dxf . Can you test it ? Thanks

Changed 4 years ago by Even Rouault

Result of conversion of infile.geojson with ticket5217_v2.patch applied

Changed 4 years ago by Even Rouault

Attachment: ticket5217_v2.patch added

Proposed patch v2

comment:5 Changed 4 years ago by renderflash

I believe you're getting closer! This is what I get now: "The following error was encountered while reading in SEQEND starting at line 1646: Class separator for class AcDbEntity? expected"

comment:6 Changed 4 years ago by Even Rouault

Thanks for your patience... Hopefully the attached out_after_ticket5217_v3_patch.dxf will be the good one

Changed 4 years ago by Even Rouault

comment:7 Changed 4 years ago by renderflash

Well, thanks for your time to fix this. And indeed it is fixed now! Great work!

comment:8 Changed 4 years ago by Even Rouault

Resolution: fixed
Status: newclosed

trunk r26372 and branches/1.10 r26373 "DXF: fix writing of POLYLINE objects (#5217, #5210)"

Note: See TracTickets for help on using tickets.