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

Railsport's GPS upload dialog gives an error on comma-delimeted tags #2032

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

Comments

@openstreetmap-trac
Copy link

Reporter: avarab[at]gmail.com
[Submitted to the original trac issue database at 9.46pm, Saturday, 4th July 2009]

"foo, bar" gives an error, "foo bar" doesn't.

The error message doesn't indicate why the user was in error.

The code should just split on /[,\s]+/.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 11.02pm, Saturday, 4th July 2009]

It's in error because tags are sometimes included in URLs and hence any URL special characters are excluded and that includes comma. Splitting is, and always has been, on whitespace not on commas.

@openstreetmap-trac
Copy link
Author

Author: avarab[at]gmail.com
[Added to the original trac issue at 11.49pm, Saturday, 4th July 2009]

Whatever it ends up accepting the error message should indicate what sort of input is acceptable.

@openstreetmap-trac
Copy link
Author

Author: StefanB
[Added to the original trac issue at 6.15am, Sunday, 5th July 2009]

otoh, splitting by commas would allow entering tags with spaces.

eg "New York" tag (as on ground!) is much better as a single tag than 2 separate tags "New" and "York" or artificially joined tag ("NewYork" or "New_York")

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 7.55am, Sunday, 5th July 2009]

Not splitting on spaces would be non-backwards compatible of course and might confuse people used to the old behaviour.

@openstreetmap-trac
Copy link
Author

Author: StefanB
[Added to the original trac issue at 8.14am, Sunday, 5th July 2009]

Splitting by commas would be employed only if commas are present, otherwise splitting by spaces for backwards compatibility (commas are not allowed now, so introducing them doesn't break anything).

In track editing mode tags could be safely shown with commas.

@openstreetmap-trac
Copy link
Author

Author: StefanB
[Added to the original trac issue at 6.08pm, Sunday, 5th July 2009]

Replying to [comment:6 StefanB]:

Splitting by commas would be employed only if commas are present, otherwise splitting by spaces for backwards compatibility (commas are not allowed now, so introducing them doesn't break anything).

The problem would only remain when user enters a single two (or more) word tag (eg "New York") as the system would split it into two tags, but that is exactly what is happening now already.

In track editing mode tags could be safely shown with commas.
Also in track details view of course.

@openstreetmap-trac
Copy link
Author

Author: StefanB
[Added to the original trac issue at 8.05pm, Monday, 6th July 2009]

Does this mean proposed design is acceptable?

I guess same behaviour should be implemented in API?
http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6#Uploading_Traces
only says:
tags: A string containing tags for the trace.
Nothing about delimiters.

@openstreetmap-trac
Copy link
Author

Author: stefanb
[Added to the original trac issue at 10.05pm, Tuesday, 7th July 2009]

(In [16373]) Introducing comma as tag separator (if present, otherwise it behaves as before), allowing spaces in tags. fixes #2032

@openstreetmap-trac
Copy link
Author

Author: StefanB
[Added to the original trac issue at 10.13pm, Tuesday, 7th July 2009]

I didn't test the /api/0.6/gpx/create API call, but it should behave the same as uploading traces via web (which works fine)

@openstreetmap-trac
Copy link
Author

Author: StefanB
[Added to the original trac issue at 5.16am, Wednesday, 8th July 2009]

tnx for polishing it up in [16376], i suspected there was some magic to do it more elegantly :)

#216 suggests some instructions about filling it in, but it seems intuitive enough to me (and some other users, as it seems). It'd probably be more useful for people that are used to old way of entering tags.

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