AmericanRedCross / osm-stats

Track and analyze contributions to Missing Maps
http://missingmaps.org
BSD 3-Clause "New" or "Revised" License
26 stars 9 forks source link

metric error in geo extent calculation #36

Closed kriscarle closed 5 years ago

kriscarle commented 8 years ago

Starting seeing this in my logs. I'm assuming you are too since it is a missingmaps changeset?

{
    "errorMessage": "Cannot read property '1' of undefined",
    "errorType": "TypeError",
    "stackTrace": [
        "Object.module.exports [as convex] (/var/task/node_modules/turf/node_modules/turf-convex/index.js:85:41)",
        "module.exports (/var/task/src/metrics/geo_extent_convexhull.js:56:27)",
        "module.exports (/var/task/src/calculate_metrics.js:49:15)",
        "Worker.addToDB (/var/task/index.js:36:15)",
        "/var/task/examples/kinesis-consumer/index.js:37:21",
        "tryCatcher (/var/task/node_modules/bluebird/js/release/util.js:16:23)",
        "Promise._settlePromiseFromHandler (/var/task/node_modules/bluebird/js/release/promise.js:502:31)",
        "Promise._settlePromise (/var/task/node_modules/bluebird/js/release/promise.js:559:18)",
        "Promise._settlePromise0 (/var/task/node_modules/bluebird/js/release/promise.js:604:10)",
        "Promise._settlePromises (/var/task/node_modules/bluebird/js/release/promise.js:683:18)",
        "Async._drainQueue (/var/task/node_modules/bluebird/js/release/async.js:138:16)",
        "Async._drainQueues (/var/task/node_modules/bluebird/js/release/async.js:148:10)",
        "Immediate.Async.drainQueues [as _onImmediate] (/var/task/node_modules/bluebird/js/release/async.js:17:14)",
        "processImmediate [as _immediateCallback] (timers.js:383:17)"
    ]
}

Here is the payload:

{
    "metadata": {
        "id": "40266328",
        "created_at": "2016-06-24T16:40:48Z",
        "closed_at": "2016-06-24T16:40:51Z",
        "open": "false",
        "num_changes": "56",
        "user": "lydiaaccenturefederal",
        "uid": "4147628",
        "min_lat": "10.8488885",
        "max_lat": "10.851519",
        "min_lon": "5.0347956",
        "max_lon": "5.0355543",
        "comments_count": "0",
        "comment": "niger state, nigeria #hotosm-project-1396 #missingmaps added #majorroads #settlements #accenture #accenturedc",
        "locale": "en-US",
        "host": "http://www.openstreetmap.org/id",
        "imagery_used": "Bing;Local GPX",
        "created_by": "iD 1.9.6"
    },
    "elements": [
        {
            "id": "427063639",
            "version": "1",
            "timestamp": "2016-06-24T16:40:49Z",
            "changeset": "40266328",
            "uid": "4147628",
            "user": "lydiaaccenturefederal",
            "action": "create",
            "type": "way",
            "tags": {},
            "nodes": [
                {
                    "ref": "4263073908",
                    "lat": "10.8492248",
                    "lon": "5.0351685"
                },
                {
                    "ref": "4263073907",
                    "lat": "10.8492775",
                    "lon": "5.0351685"
                },
                {
                    "ref": "4263073909",
                    "lat": "10.8491722",
                    "lon": "5.0351631"
                }
            ]
        },
        {
            "id": "427063640",
            "version": "1",
            "timestamp": "2016-06-24T16:40:49Z",
            "changeset": "40266328",
            "uid": "4147628",
            "user": "lydiaaccenturefederal",
            "action": "create",
            "type": "way",
            "tags": {},
            "nodes": [
                {
                    "ref": "4263073910",
                    "lat": "10.8491247",
                    "lon": "5.0351739"
                },
                {
                    "ref": "4263073909",
                    "lat": "10.8491722",
                    "lon": "5.0351631"
                },
                {
                    "ref": "4263073911",
                    "lat": "10.8490826",
                    "lon": "5.0351792"
                },
                {
                    "ref": "4263073912",
                    "lat": "10.8490352",
                    "lon": "5.0351900"
                },
                {
                    "ref": "4263073913",
                    "lat": "10.8489825",
                    "lon": "5.0352061"
                },
                {
                    "ref": "4263073914",
                    "lat": "10.8489351",
                    "lon": "5.0352168"
                }
            ]
        },
        {
            "id": "427063641",
            "version": "1",
            "timestamp": "2016-06-24T16:40:49Z",
            "changeset": "40266328",
            "uid": "4147628",
            "user": "lydiaaccenturefederal",
            "action": "create",
            "type": "way",
            "tags": {
                "highway": "path"
            },
            "nodes": [
                {
                    "ref": "4263069781",
                    "lat": "10.8508380",
                    "lon": "5.0349840"
                },
                {
                    "ref": "4263069782",
                    "lat": "10.8508130",
                    "lon": "5.0349840"
                }
            ]
        },
        {
            "id": "427063642",
            "version": "1",
            "timestamp": "2016-06-24T16:40:49Z",
            "changeset": "40266328",
            "uid": "4147628",
            "user": "lydiaaccenturefederal",
            "action": "create",
            "type": "way",
            "tags": {},
            "nodes": [
                {
                    "ref": "4263069784",
                    "lat": "10.8507487",
                    "lon": "5.0349840"
                },
                {
                    "ref": "4263073915",
                    "lat": "10.8507320",
                    "lon": "5.0349829"
                },
                {
                    "ref": "4263069785",
                    "lat": "10.8507201",
                    "lon": "5.0349876"
                }
            ]
        },
        {
            "id": "427063643",
            "version": "1",
            "timestamp": "2016-06-24T16:40:49Z",
            "changeset": "40266328",
            "uid": "4147628",
            "user": "lydiaaccenturefederal",
            "action": "create",
            "type": "way",
            "tags": {
                "highway": "path"
            },
            "nodes": [
                {
                    "ref": "4263069781",
                    "lat": "10.8508380",
                    "lon": "5.0349840"
                },
                {
                    "ref": "4263069782",
                    "lat": "10.8508130",
                    "lon": "5.0349840"
                },
                {
                    "ref": "4263073916",
                    "lat": "10.8507737",
                    "lon": "5.0349840"
                }
            ]
        },
        {
            "id": "427063644",
            "version": "1",
            "timestamp": "2016-06-24T16:40:49Z",
            "changeset": "40266328",
            "uid": "4147628",
            "user": "lydiaaccenturefederal",
            "action": "create",
            "type": "way",
            "tags": {},
            "nodes": [
                {
                    "ref": "4263073916",
                    "lat": "10.8507737",
                    "lon": "5.0349840"
                },
                {
                    "ref": "4263069785",
                    "lat": "10.8507201",
                    "lon": "5.0349876"
                },
                {
                    "ref": "4263073917",
                    "lat": "10.8506946",
                    "lon": "5.0349809"
                }
            ]
        }
    ]
}
mojodna commented 5 years ago

This refers to the previous version of osm-stats-workers and is no longer relevant.