Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#3842 closed defect (fixed)

Transfrom from GPX to GeoJSON returns invalid JSON

Reported by: wavded Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: 1.7.2
Severity: major Keywords:
Cc: wavded@…


Steps to Reproduce:

  1. Download attached GPX sample file.
  2. Run ogr2ogr -f "GeoJSON" sample.json sample.gpx
  3. Paste result in

It's missing some "commas" when the nesting gets more than one level deep.

Attachments (1)

sample.gpx (29.2 KB) - added by wavded 9 years ago.
Sample GPX File

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by wavded

Attachment: sample.gpx added

Sample GPX File

comment:1 Changed 9 years ago by Even Rouault

Milestone: 1.7.4
Resolution: fixed
Status: newclosed

The issue was that the GeoJSON driver doesn't support creating multiple layers, but it didn't complain explicitely. You must specify just one layer in the ogr2ogr command line.

Error message added in trunk (r21171) and branches/1.7 (r21172)

comment:2 Changed 7 years ago by Even Rouault

Milestone: 1.7.4

Milestone 1.7.4 deleted

Note: See TracTickets for help on using tickets.