[Geojson] GPX files to GeoJSON

John Smith delta_foxtrot at yahoo.com
Thu Jun 25 07:57:59 PDT 2009


--- On Thu, 25/6/09, Sean Gillies <sgillies at frii.com> wrote:

> GeoJSON wasn't particularly designed for GPX, as you're
> discovering, but is general enough that GPS traces can be
> represented in a few different ways.

If the fields had column names like JSON is designed, it wouldn't be a problem to extend things in any number of ways to deal with this.

> A GPS trace isn't a geometry in the GML sense (GeoJSON is
> inspired by, and fairly faithful to the GML geometry model,
> or at least a subset). I see two ways to do this without
> inventing a odd geometry type: 1) every trace point as a
> GeoJSON feeature with a point geometry (3D even) and time
> and hdop properties, or 2) a trace as a GeoJSON feature with
> a multipoint or linestring geometry (3D even) and time and
> hdop array properties having the same length as your
> geometry coordinates, perhaps even within a "gpx" object
> like this:
> 
> { "type": "Feature",
>   "geometry": { "type": "LineString",
>                
> "coordinates": [[0.0, 0.0], [1.0, 1.0]]
>                 },
>   "properties": { "gpx": { "hdop": [0, 0], "time":
> [1..., 2...] } },
>   "title": "GPS trace feature"
>   }
> 
> I believe it was Jeremy Cothran who proposed matching
> arrays to me. I didn't like it at first, but it's growing on
> me.

I think that would waste a lot of memory and/or be very inefficient to parse/process.

I don't see the point in having 2 arrays with virtually identical data, when one would accomplish a thing.

Also GPS traces are fairly geospatial. :) so I don't know why GPS traces don't fit in this particular model, all it will do is force people to do there own thing where GeoJSON could fit the role just fine with very little tweaking.


      



More information about the GeoJSON mailing list