Giter Club home page Giter Club logo

Comments (6)

bkowshik avatar bkowshik commented on September 23, 2024 1

From real-changesets, a changeset adding a turn-restriction looks like below:

{
    "elements": [
        {
            "id": "7450991",
            "version": "1",
            "timestamp": "2017-08-07T00:06:40Z",
            "changeset": "50899742",
            "uid": "589596",
            "user": "lxbarth",
            "action": "create",
            "type": "relation",
            "tags": {
                "restriction": "no_left_turn",
                "type": "restriction"
            },
            "members": [
                {
                    "type": "way",
                    "ref": "23871010",
                    "role": "from",
                    "nodes": [
                        {
                            "lat": "37.7596955",
                            "lon": "-122.4282483"
                        },
                        {
                            "lat": "37.7595591",
                            "lon": "-122.4303410"
                        },
                        {
                            "lat": "37.7595539",
                            "lon": "-122.4304416"
                        },
                        {
                            "lat": "37.7595482",
                            "lon": "-122.4305370"
                        },
                        {
                            "lat": "37.7594230",
                            "lon": "-122.4326380"
                        },
                        {
                            "lat": "37.7593560",
                            "lon": "-122.4337450"
                        },
                        {
                            "lat": "37.7592988",
                            "lon": "-122.4348751"
                        }
                    ]
                },
                {
                    "type": "node",
                    "ref": "65293636",
                    "role": "via",
                    "lat": "37.7596955",
                    "lon": "-122.4282483",
                    "nodes": []
                },
                {
                    "type": "way",
                    "ref": "217358397",
                    "role": "to",
                    "nodes": [
                        {
                            "lat": "37.7612812",
                            "lon": "-122.4283911"
                        },
                        {
                            "lat": "37.7612257",
                            "lon": "-122.4283900"
                        },
                        {
                            "lat": "37.7604909",
                            "lon": "-122.4283241"
                        },
                        {
                            "lat": "37.7596955",
                            "lon": "-122.4282483"
                        }
                    ]
                }
            ]
        }
    ],
    "metadata": {
        "id": "50899742",
        "created_at": "2017-08-07T00:06:40Z",
        "closed_at": "2017-08-07T00:06:40Z",
        "open": "false",
        "user": "lxbarth",
        "uid": "589596",
        "min_lat": "37.7592988",
        "min_lon": "-122.4348751",
        "max_lat": "37.7613208",
        "max_lon": "-122.4282483",
        "comments_count": "0",
        "tag": [
            {
                "k": "comment",
                "v": "Add TR. Source: local knowledge."
            },
            {
                "k": "locale",
                "v": "en-US"
            },
            {
                "k": "host",
                "v": "https://www.openstreetmap.org/edit"
            },
            {
                "k": "imagery_used",
                "v": "Bing aerial imagery"
            },
            {
                "k": "created_by",
                "v": "iD 2.3.2"
            }
        ]
    }
}

from osm-compare.

willemarcel avatar willemarcel commented on September 23, 2024 1

@maning @bkowshik I've made an improvement to the turn restriction function: #184

It doesn't detect errors in restriction with VIA ways, but it's good enough to detect the main cases of invalid turn restrictions

from osm-compare.

maning avatar maning commented on September 23, 2024

Possible logic we can re-use: https://github.com/MorbZ/restriction-validator/blob/master/script.js

from osm-compare.

maning avatar maning commented on September 23, 2024

cc: @chtnha

from osm-compare.

bkowshik avatar bkowshik commented on September 23, 2024

We have an initial compare function to flag all touched turn-restrictions. By touched, I mean turn-restrictions that are either created, modified or deleted.

The changesets flagged by this compare function can be seen on osmcha with the following filter:

  • Touched a turn restriction

cc: @batpad @krishnanammala

from osm-compare.

willemarcel avatar willemarcel commented on September 23, 2024

Stats for this comparator: https://osmcha.mapbox.com/api/v1/stats/?reasons=84
more than 15000 changesets flagged, only 105 verified and only 4 set as harmful.

from osm-compare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.