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

Potlatch doesn't show some gpx-es entirely or shows them partially #1648

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

Comments

@openstreetmap-trac
Copy link

Reporter: eddyp
[Submitted to the original trac issue database at 1.36pm, Friday, 13th March 2009]

Due to our colaboration with Norc (norc.ro) we, the Romanian team, have managed to get the tracks used they got during their streetview surveys. All of these were imported under the user norcTracks:

http://www.openstreetmap.org/user/norcTracks/traces

There seems to be a problem with these tracks and some parts of them are missing entirely or sections of them.

For instance, when trying to edit this area:

http://www.openstreetmap.org/edit?lat=44.83865&lon=24.897446&zoom=18

on the right side, you can see part of a track (322826) from norc, but not as a continuous line.

This is not as bad as the long(/entire?) missing part of the gpx 322818 which should be visible in the centre of the image, between "Strada Basarabiei" (now way 23683847) and "Petrochimistilor" (now way 23330467).

The entire track still can be seen if editing via the edit link in the trace page (I hacked the link to focus by default on the problematic areas):

http://www.openstreetmap.org/edit?gpx=322818&lat=44.8389&lon=24.8979&zoom=18

Same is true for the interrupted track (same hack applied) which was interrupted in normal edit, after 'g', but now is a continuous line:

http://www.openstreetmap.org/edit?gpx=322826&lat=44.83865&lon=24.897446&zoom=18

Why are parts of these tracks missing?

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 3.18pm, Friday, 13th March 2009]

The OSM database doesn't import sub-second timestamps on GPS tracks: anything after the second will be truncated.

Potlatch's GPS display (when pressing 'g' - swf_controller.rb) draws lines between points by timestamp. However, where two points have the same timestamp - as these do after the sub-second portion has been truncated - it won't draw a line. This was added to avoid the case where people upload GPS traces with the same (faked) timestamp on every point, which otherwise makes an almighty mess of the display.

I guess the best solution would be for Potlatch to only draw a dot, not a line, in this case.

@openstreetmap-trac
Copy link
Author

Author: eddyp
[Added to the original trac issue at 3.49pm, Friday, 13th March 2009]

Replying to [comment:1 Richard]:

The OSM database doesn't import sub-second timestamps on GPS tracks: anything after the second will be truncated.

That is really a bad decision. The tracks which we have from Norc are sampled at 5 samples/second and they have corrections (dgps) so they are really accurate.

Is there a way to fix this now, or do the tables need to altered? The downloaded trace contains the subseconds, so the data is correctly stored, so I guess all the interfaces need to be fixed (since some are working - see edit trace).

Potlatch's GPS display (when pressing 'g' - swf_controller.rb) draws lines between points by timestamp. However, where two points have the same timestamp - as these do after the sub-second portion has been truncated - it won't draw a line. This was added to avoid the case where people

OK, but why are entire long sections missing (see trace 322818 in the snapshot)?

upload GPS traces with the same (faked) timestamp on every point, which otherwise makes an almighty mess of the display.

I think that someone used an unappropriately sized hammer to fix a issue which doesn't seem hard to fix otherwise (find identically timed points and eliminate/ignore them).

This sounds fixable, can it be done?

I guess the best solution would be for Potlatch to only draw a dot, not a line, in this case.

That would not be a good idea for traces which intersect themselves since the direction of a connection is not clear at all if only dots are drawn.

I think the best solution is to actually allow such high resolutions, not allow points with the same timestamp and use the same trace rendering path for regular edit as is used when 'trace edit'-ing.

Note that I disagree this is a minor bug or even an enhancement since clearly valid and acurate real data is truncated. I will change this, unless some reasonable explanation for the priority downgrade and type downgrade is provided since it helps nobody to hide the dirt under the rug.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 12.11am, Monday, 16th March 2009]

Replying to [comment:2 eddyp]:

Replying to [comment:1 Richard]:

The OSM database doesn't import sub-second timestamps on GPS tracks: anything after the second will be truncated.

That is really a bad decision. The tracks which we have from Norc are sampled at 5 samples/second and they have corrections (dgps) so they are really accurate.

Is there a way to fix this now, or do the tables need to altered? The downloaded trace contains the subseconds, so the data is correctly stored, so I guess all the interfaces need to be fixed (since some are working - see edit trace).

No, the data is not correctly stored.

Traces are recorded in two ways on the server. Firstly, they're imported into a table of GPX points. To the best of my knowledge, this truncates timestamps to the second. Potlatch uses this table when you press 'g', because the table is indexed so you can query it by bbox.

Secondly, the original .gpx file is also saved on the server, unchanged (except potentially for .gz compression to save space). Potlatch uses these files when you click 'edit' by a trace. Consequently it is able to retrieve the subsecond timestamp information.

OK, but why are entire long sections missing (see trace 322818 in the snapshot)?

Don't know off-hand. If you can extract the right bit of the trace I'll have a look at it, but I'm on a mobile connection right now and can't download a 5Mb GPX.

I think that someone used an unappropriately sized hammer to fix a issue which doesn't seem hard to fix otherwise (find identically timed points and eliminate/ignore them).

This sounds fixable, can it be done?

No, for the above reason.

I think the best solution is to actually allow such high resolutions, not allow points with the same timestamp

Maybe so, but you're talking to the wrong guy here. Potlatch is doing the best it can with the data that exists in the database. I don't know anything about the GPX importer, so I suggest you re-enter/refile as a ticket against the API.

@openstreetmap-trac
Copy link
Author

Author: eddyp
[Added to the original trac issue at 6.37pm, Wednesday, 18th March 2009]

Replying to [comment:3 Richard]:

Replying to [comment:2 eddyp]:

Replying to [comment:1 Richard]:

The OSM database doesn't import sub-second timestamps on GPS tracks: anything after the second will be truncated.

That is really a bad decision. The tracks which we have from Norc are sampled at 5 samples/second and they have corrections (dgps) so they are really accurate.

Is there a way to fix this now, or do the tables need to altered? The downloaded trace contains the subseconds, so the data is correctly stored, so I guess all the interfaces need to be fixed (since some are working - see edit trace).

No, the data is not correctly stored.

Traces are recorded in two ways on the server. Firstly, they're imported into a table of GPX points. To the best of my knowledge, this truncates timestamps to the second. Potlatch uses this table when you press 'g', because the table is indexed so you can query it by bbox.

Secondly, the original .gpx file is also saved on the server, unchanged (except potentially for .gz compression to save space). Potlatch uses these files when you click 'edit' by a trace. Consequently it is able to retrieve the subsecond timestamp information.

Is it possible to get the GPX ids via the indexed table then fetch the complete gpx-es? Would that be too slow?

OK, but why are entire long sections missing (see trace 322818 in the snapshot)?

Don't know off-hand. If you can extract the right bit of the trace I'll have a look at it, but I'm on a mobile connection right now and can't download a 5Mb GPX.

I just tried, Firefox went into an IO spiral.

I think that someone used an unappropriately sized hammer to fix a issue which doesn't seem hard to fix otherwise (find identically timed points and eliminate/ignore them).

This sounds fixable, can it be done?

No, for the above reason.

Is the table limited that way? I mean are the data types for the time stamps not fit to store the information, if that limitation were to e removed?

I think the best solution is to actually allow such high resolutions, not allow points with the same timestamp

Maybe so, but you're talking to the wrong guy here. Potlatch is doing the best it can with the data that exists in the database. I don't know anything about the GPX importer, so I suggest you re-enter/refile as a ticket against the API.

Yes, indeed, taking into account that norcTracks is the account with the second most number of tracks (after LostTracks) which are VERY precise I guess it would make sense to try to fix that in the API, or at least allow a reimport (from the .gz-ed files) without the no-subsecond filter.

@openstreetmap-trac
Copy link
Author

Author: eddyp
[Added to the original trac issue at 7.15pm, Wednesday, 18th March 2009]

Submitted bug against the API:

http://trac.openstreetmap.org/ticket/1657

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 12.29pm, Monday, 11th May 2009]

Now that we have Postgres, I believe Potlatch itself will order correctly by partial timestamps, so we can close this ticket pending any change or otherwise in the API.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 1.14pm, Monday, 11th May 2009]

Note that only tracks imported since the move to API 0.6 will have fractional timestamps in the points table.

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