Opened 12 years ago

Closed 12 years ago

#479 closed defect (fixed)

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

Reported by: andy_j_robinson@… Owned by: steve@…
Priority: major Milestone:
Component: rails_port Version:
Keywords: Cc:

Description

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.

Attachments (1)

gpx.patch (1.2 KB) - added by Tom Hughes 12 years ago.
Patch to only read the GPX file once

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by Tom Hughes

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.

Changed 12 years ago by Tom Hughes

Attachment: gpx.patch added

Patch to only read the GPX file once

comment:2 Changed 12 years ago by Tom Hughes

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.

comment:3 Changed 12 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

Patch committed as r3043.

Note: See TracTickets for help on using tickets.