Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#730 closed defect (invalid)

disallow empty tag values?

Reported by: Robert Vollmert Owned by: Tom Hughes
Priority: minor Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

I ran into way http://api.openstreetmap.org/api/0.5/way/23008053 which has an access tag with an empty value. When filing this bug report, I'm making two guesses/assumptions, sorry if they're wrong.

First that the way was actually created by merkaator.

Second that empty values are bad. Other editors treat empty tag values to mean absence/deletion of that tag, but I don't think the API states that key/value should be non-empty.

Change History (4)

comment:1 Changed 11 years ago by Tom Hughes

Component: adminapi
Priority: majorminor
Resolution: wontfix
Status: newclosed

I'm not going to change the semantics of the API merely based on one person's opinion - if you think empty values should be prohibited then I suggest you start a discussion on the mailing lists and try and get a consensus from the community as to the correct approach.

comment:2 Changed 11 years ago by Robert Vollmert

Component: apimerkaator
Resolution: wontfix
Status: closedreopened

Sorry, I must have forgotten to set the component. I meant to file this against merkaator. I was just hoping for consistent behaviour between the different editors, not for a change to the API.

comment:3 Changed 11 years ago by Chris Browet

Resolution: invalid
Status: reopenedclosed

If Tom says the API actually allows this, there is no reason for Merkaartor to disallow it. Furthermore:

  • An empty KEY is rejected
  • I doubt the other editors consider a tag as void if the VALUE is empty
  • For boolean tags (e.g. "oneway"), I consider an empty value could be as valid than the other possibilities (Yes/true/1/...), i.e. à la "#define"

comment:4 Changed 11 years ago by Robert Vollmert

I don't particularly mind if Merkaartor continues to allow empty values. I do believe consistent behaviour between the editors to be desirable.

Both Potlatch and JOSM definitely consider an empty tag value as meaning the tag is to be deleted.

JOSM displays a downloaded empty tag fine, but doesn't allow creating it.

Potlatch doesn't even display it. Editing a way with such a tag (I added an extra tag and later deleted it) removes the empty tag also. Potlatch's revert (using 'H') doesn't recreate the empty tag either.

I'm not reporting this as a Potlatch bug, but go ahead if you wish.

Note: See TracTickets for help on using tickets.