{"action":"created","issue":{"url":"https://api.github.com/repos/osmlab/osmlint/issues/17","labels_url":"https://api.github.com/repos/osmlab/osmlint/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/osmlab/osmlint/issues/17/comments","events_url":"https://api.github.com/repos/osmlab/osmlint/issues/17/events","html_url":"https://github.com/osmlab/osmlint/issues/17","id":122730660,"number":17,"title":"Callback to function should be passed data instead of needing to read stdout","user":{"login":"batpad","id":72280,"avatar_url":"https://avatars.githubusercontent.com/u/72280?v=3","gravatar_id":"","url":"https://api.github.com/users/batpad","html_url":"https://github.com/batpad","followers_url":"https://api.github.com/users/batpad/followers","following_url":"https://api.github.com/users/batpad/following{/other_user}","gists_url":"https://api.github.com/users/batpad/gists{/gist_id}","starred_url":"https://api.github.com/users/batpad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batpad/subscriptions","organizations_url":"https://api.github.com/users/batpad/orgs","repos_url":"https://api.github.com/users/batpad/repos","events_url":"https://api.github.com/users/batpad/events{/privacy}","received_events_url":"https://api.github.com/users/batpad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-17T13:04:13Z","updated_at":"2015-12-18T05:54:23Z","closed_at":null,"body":"Right now, as per the docs:\r\n\r\n```\r\n    // Outputs nodes with bridge tags to stdout\r\nrequire('osmlint').bridgeOnNode([-122.1, 36.9, -121.9, 37.0], 15, './osm.mbtiles', function() {\r\n    console.log('done');\r\n});\r\n```\r\n\r\nI would expect the callback `function()` there to receive something like `data` with the invalid features rather than needing to read `stdout`."},"comment":{"url":"https://api.github.com/repos/osmlab/osmlint/issues/comments/165680200","html_url":"https://github.com/osmlab/osmlint/issues/17#issuecomment-165680200","issue_url":"https://api.github.com/repos/osmlab/osmlint/issues/17","id":165680200,"user":{"login":"lxbarth","id":98233,"avatar_url":"https://avatars.githubusercontent.com/u/98233?v=3","gravatar_id":"","url":"https://api.github.com/users/lxbarth","html_url":"https://github.com/lxbarth","followers_url":"https://api.github.com/users/lxbarth/followers","following_url":"https://api.github.com/users/lxbarth/following{/other_user}","gists_url":"https://api.github.com/users/lxbarth/gists{/gist_id}","starred_url":"https://api.github.com/users/lxbarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lxbarth/subscriptions","organizations_url":"https://api.github.com/users/lxbarth/orgs","repos_url":"https://api.github.com/users/lxbarth/repos","events_url":"https://api.github.com/users/lxbarth/events{/privacy}","received_events_url":"https://api.github.com/users/lxbarth/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T05:54:23Z","updated_at":"2015-12-18T05:54:23Z","body":"None of the validators aggregate features right now ([example](https://github.com/osmlab/osmlint/blob/master/validators/bridgeOnNode/index.js#L17)) but rather write feature by feature to stdout to save memory. This makes sure they scale.\r\n\r\nWe could make aggregation optional like so:\r\n\r\n    require('osmlint').bridgeOnNode(\r\n        [-122.1, 36.9, -121.9, 37.0],\r\n        15,  true /* means aggregate! */,\r\n        './osm.mbtiles', function(geojson) {\r\n        console.log(geojson);\r\n    });\r\n"}}