Opened 11 years ago

Closed 11 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 11 years ago.
3D geojson Linestring to test with
ticket5217.patch (1.5 KB ) - added by Even Rouault 11 years ago.
Proposed patch
out_after_ticket5217_patch.dxf (21.4 KB ) - added by Even Rouault 11 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 11 years ago.
Result of conversion of infile.geojson with ticket5217_v2.patch applied
ticket5217_v2.patch (1.5 KB ) - added by Even Rouault 11 years ago.
Proposed patch v2
out_after_ticket5217_v3_patch.dxf (21.4 KB ) - added by Even Rouault 11 years ago.

Download all attachments as: .zip

Change History (14)

by renderflash, 11 years ago

Attachment: infile.geojson added

3D geojson Linestring to test with

comment:1 by Even Rouault, 11 years ago

Might be linked with #5210

comment:2 by Even Rouault, 11 years ago

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 ?

by Even Rouault, 11 years ago

Attachment: ticket5217.patch added

Proposed patch

by Even Rouault, 11 years ago

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

comment:3 by renderflash, 11 years ago

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 by Even Rouault, 11 years ago

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

by Even Rouault, 11 years ago

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

by Even Rouault, 11 years ago

Attachment: ticket5217_v2.patch added

Proposed patch v2

comment:5 by renderflash, 11 years ago

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 by Even Rouault, 11 years ago

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

by Even Rouault, 11 years ago

comment:7 by renderflash, 11 years ago

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

comment:8 by Even Rouault, 11 years ago

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.