Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ref tag case sensitivity #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

russss
Copy link

@russss russss commented Jan 30, 2021

At the moment it's not possible to correctly use ref: tag keys which contain uppercase characters (I'm not a huge fan of them but it has become common to namespace ref: tags with the uppercase country code).

Overpass is case sensitive but osm_conflate currently lowercases all tag names. This change uses the CaseInsensitiveDict class from requests (which is already a dependency) in SourcePoint to avoid tag name case issues.

I've tested this and it now behaves correctly with a ref tag key containing uppercase characters.

@russss russss marked this pull request as draft January 30, 2021 16:35
@russss
Copy link
Author

russss commented Jan 30, 2021

Actually, there is still a slight issue with this, I'll sort it.

@russss russss marked this pull request as ready for review January 30, 2021 16:49
@Zverik
Copy link
Contributor

Zverik commented Feb 1, 2021

Thanks for the PR! There are two things missing now: value.strip() for each value, and skipping keys with value is None.

At the moment it's not possible to correctly use `ref:` tag names
which contain uppercase characters (I'm not a huge fan of them but
it has become common to namespace `ref:` tags with the uppercase
country code).

Overpass is case sensitive but osm_conflate currently lowercases all tag
names. This change uses the CaseInsensitiveDict class from `requests`
(which is already a dependency) in SourcePoint to avoid tag name case
issues.
@russss
Copy link
Author

russss commented Feb 1, 2021

Oops, yes. Fixed.

@Zverik
Copy link
Contributor

Zverik commented Feb 2, 2021

And now it won't take tags == None :)

I'll have to check the code and examples to confirm that lowercase keys were not a requirement for some obscure process.

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

Successfully merging this pull request may close these issues.

2 participants