Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

gpx file import emails are not reporting the correct number of imported points #479

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments

Comments

@openstreetmap-trac
Copy link

Reporter: andy_j_robinson[at]blueyonder.co.uk
[Submitted to the original trac issue database at 11.27pm, Tuesday, 22nd May 2007]

Example: The following file I know has 9999 points (its been imported previously with 9999 points too):

Hi,

It looks like your GPX file

AJR_G_220407_9999_point_test_copy.gpx

loaded successfully with 29997 out of a possible
29997 points.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 11.09am, Thursday, 24th May 2007]

It currently reports exactly three times the correct number - the gpx_files table also winds up with the same wrong number for the size. The correct points are imported into gps_points though.

The reason is that OSM::GPXImporter.points is getting called three times - once to insert the points in the database, once to build the big image of the trace and once to build the icon for the trace. Each time it is called it reparses the file (!) and continues added to actual_points and related attributes. So at the end we have three times as many points counted as really exist.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 12.05am, Friday, 25th May 2007]

With this patch the time to load a 11500 point GPX file on my machine drops from 2:45 to 1:25 as well as reporting the correct number of points.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 3.38pm, Monday, 28th May 2007]

Patch committed as r3043.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant