Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Improving invalid-tag-modification comparator #147

Open
bkowshik opened this issue Apr 10, 2017 · 3 comments
Open

Improving invalid-tag-modification comparator #147

bkowshik opened this issue Apr 10, 2017 · 3 comments

Comments

@bkowshik
Copy link
Contributor

bkowshik commented Apr 10, 2017

Per stats here: #143 (comment) and continuing from here: #127


Invalid tag modification labels a lot of changesets, how can we improve this comparator?

Total stats

  • Changesets labelled "Invalid tag modification": 7,644
  • Changesets checked: 220
  • Changesets harmful: 25
  • Hit rate: 11.36%

Daily stats

  • Average changesets labelled everyday: 1274
  • Average changesets checked everyday: 37
  • Average changesets harmful everyday: 4

index

@bkowshik
Copy link
Contributor Author

The hypothesis behind the invalid-tag-modification compare function are:

  • The primary tag of a feature is the identity of the feature.
  • If a feature loose it's the primary tag, that means that it looses it's identity.
  • A feature loosing it's identity could be problematic.

Good detections

Converting a residential area into a park

screen shot 2017-04-06 at 5 30 39 pm

Removal of uncommon tags.

False detections

Fix of a harmful edit gets flagged too

Tags moved from feature to relation

relation

Specialized value instead of specialized key

@maning
Copy link
Contributor

maning commented Apr 10, 2017

False positive here: https://osmcha.mapbox.com/47616490/
My edits are the following which I believe are valid:

  • removed hotel tag in a convenience store
  • moved the landuse=residential name from node to polygon

@bkowshik
Copy link
Contributor Author

I analyzed the 220 changesets checked on osmcha with 1,892 features to understand what primary tags are commonly deleted from features? Ex:

  • The building primary tag was deleted from 879 features.
    index

When primary tag of a feature is deleted:

  • Is the feature given a new primary tag?
  • If yes, which is the new primary tag?

screen shot 2017-04-11 at 3 31 58 pm

For example, there were 8 occasions when landuse tag was deleted and building was added for the feature. Incidentally, 6 of the 8 were actually harmful. Ex: way!478636519 and relation!4656986.

2nd primary tag

Looking at quite a lot of modifications, I could infer that removing building=yes is a 👍 in scenarios when a feature has two or more primary tags, with one being building. Ex:

NOTE: Out of 879 building features flaged for invalid_tag_modification, 843 look like ^

Part of a relation

Feature's can be made part of a relation with all or some of it's properties removed.

Feature changes like ^ mostly are good which we can 👍 for now. The problem is the feature does not have a reference to it being part of a relation. Any ideas to handle this scenario @geohacker @batpad @amishas157. The only hack I can think of is if all properties of a feature are removed, we could assume that the feature is becoming a part of a relation. This has been true for almost 100% of the modification's I have 👀.

# Example of a feature coming to the comparator.
# Note that there isn't any reference to the relation that it is part of.
{
    "type": "Feature",
    "id": "way!333194926!3",
    "properties": {
        "osm:type": "way",
        "osm:id": 333194926,
        "osm:version": 3,
        "osm:changeset": 47592706,
        "osm:timestamp": 1491745717000,
        "osm:uid": 665748,
        "osm:user": "sebastic"
    },
    "geometry": {
        "type": "LineString",
        "coordinates": [
            [
                -76.4374173,
                36.98812
            ],
            [
                -76.4372177,
                36.9877951
            ],
            [
                -76.4371429,
                36.9878247
            ],
            [
                -76.4370818,
                36.9877254
            ],
            [
                -76.4369996,
                36.9877579
            ],
            [
                -76.4372598,
                36.9881822
            ],
            [
                -76.4374173,
                36.98812
            ]
        ]
    }
}

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

No branches or pull requests

2 participants