Opened 13 years ago

Closed 13 years ago

Last modified 11 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@…

Description

Steps to Reproduce:

  1. Download attached GPX sample file.
  2. Run ogr2ogr -f "GeoJSON" sample.json sample.gpx
  3. Paste result in http://www.jsonlint.com/

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

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

by wavded, 13 years ago

Attachment: sample.gpx added

Sample GPX File

comment:1 by Even Rouault, 13 years ago

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

Milestone: 1.7.4

Milestone 1.7.4 deleted

Note: See TracTickets for help on using tickets.