[OSM-dev] Basic GPX parser in OpenLayers

Christopher Schmidt crschmidt at metacarta.com
Thu Oct 18 16:44:15 BST 2007


On Thu, Oct 18, 2007 at 04:49:06PM +0200, Joerg Ostertag (OSM Munich/Germany) wrote:
> On Donnerstag 18 Oktober 2007, Christopher Schmidt wrote:
> > On Thu, Oct 18, 2007 at 03:08:48PM +0100, Tom Hughes wrote:
> > > In message <20071018135805.GA18708 at metacarta.com>
> > >
> > >         Christopher Schmidt <crschmidt at metacarta.com> wrote:
> > > > Note that parsing Very Large data could take awhile -- I don't know how
> > > > long of tracks people typically upload. The 1000 point track from my
> > > > commute this morning was ~200kb -- but my GPS recording client is kinda
> > > > verbose.
> > > >
> > > > Anyone have some examples of how big a 'large' gpx file usually is for
> > > > them that I can try out for performance?
> > >
> > > Well http://www.openstreetmap.org/user/TomH/traces/43998 is a 26 mile
> > > cycle trace from last weekend - about 3.5 hours worth.
> >
> > Okay. That one is a bit long :) Not unbearably so. I'll take that as a
> > target and see if I can improve performance to the extent that load time
> > is tenable.
> 
> Last time I tested the max size of GPX accepted by the osm-server was 5MB 
> compressed. Just for Info.

Yeah, there's no way that OpenLayers is going to support drawing a GPX
file that big -- even assuming I can figure out how to make the browser
load the .gz compressed data properly, it's still going to be ~50mb of
uncompressed data (if tom's 300k -> 3MB is any standard comparison), and
that's not going to be doable.

Since the point counts are available in the GPX tracklog page (it
seems), hopefully we can at least stick it in there for GPX tracklogs
with less than some number of points -- 1000 is ~2s to render, whereas
12000 was 90s, so if I do some speed improvements on it, maybe ew can
have support for 1000-5000 points or so.

Note that there will also be some slowdown for displaying the data on
the main OSM map as well -- since the map is mercator projected, we may
have to limit ourselves more once projection comes into play.

In any case, I'll keep working on seeing what we can get
speed/performance down to, and work on seeing if I can get support for
getting this into OL trunk.  

Regards,
-- 
Christopher Schmidt
MetaCarta




More information about the dev mailing list