{"action":"created","comment":{"url":"https://api.github.com/repos/mapbox/geojsonhint/pulls/comments/56005862","id":56005862,"diff_hunk":"@@ -149,22 +191,76 @@ function hint(gj, options) {\n         }\n     }\n \n-    function crs(_) {\n-        if (!_.crs) return;\n-        if (typeof _.crs === 'object') {\n-            var strErr = requiredProperty(_.crs, 'type', 'string'),\n-                propErr = requiredProperty(_.crs, 'properties', 'object');\n-            if (!strErr && !propErr) {\n-                // http://geojson.org/geojson-spec.html#named-crs\n-                if (_.crs.type === 'name') {\n-                    requiredProperty(_.crs.properties, 'name', 'string');\n-                } else if (_.crs.type === 'link') {\n-                    requiredProperty(_.crs.properties, 'href', 'string');\n+\n+    function rightHandRule (geometry) {\n+        var rhr = true;\n+        if (geometry.type == 'Polygon') {\n+            rhr = isPolyRHR(geometry.coordinates);\n+        } else if (geometry.type == 'MultiPolygon') {\n+            for (var i = 0; i < geometry.coordinates.length; i++) {","path":"object.js","position":128,"original_position":128,"commit_id":"223a2f13225df0bc24d9ea32fcb6c926aef27418","original_commit_id":"223a2f13225df0bc24d9ea32fcb6c926aef27418","user":{"login":"perrygeo","id":1151287,"avatar_url":"https://avatars.githubusercontent.com/u/1151287?v=3","gravatar_id":"","url":"https://api.github.com/users/perrygeo","html_url":"https://github.com/perrygeo","followers_url":"https://api.github.com/users/perrygeo/followers","following_url":"https://api.github.com/users/perrygeo/following{/other_user}","gists_url":"https://api.github.com/users/perrygeo/gists{/gist_id}","starred_url":"https://api.github.com/users/perrygeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perrygeo/subscriptions","organizations_url":"https://api.github.com/users/perrygeo/orgs","repos_url":"https://api.github.com/users/perrygeo/repos","events_url":"https://api.github.com/users/perrygeo/events{/privacy}","received_events_url":"https://api.github.com/users/perrygeo/received_events","type":"User","site_admin":false},"body":"`every` and `some` are perfect fit :+1: ","created_at":"2016-03-14T14:14:03Z","updated_at":"2016-03-14T14:14:03Z","html_url":"https://github.com/mapbox/geojsonhint/pull/37#discussion_r56005862","pull_request_url":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/mapbox/geojsonhint/pulls/comments/56005862"},"html":{"href":"https://github.com/mapbox/geojsonhint/pull/37#discussion_r56005862"},"pull_request":{"href":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37","id":62429179,"html_url":"https://github.com/mapbox/geojsonhint/pull/37","diff_url":"https://github.com/mapbox/geojsonhint/pull/37.diff","patch_url":"https://github.com/mapbox/geojsonhint/pull/37.patch","issue_url":"https://api.github.com/repos/mapbox/geojsonhint/issues/37","number":37,"state":"open","locked":false,"title":"[needs review] initial updates to support IETF spec","user":{"login":"perrygeo","id":1151287,"avatar_url":"https://avatars.githubusercontent.com/u/1151287?v=3","gravatar_id":"","url":"https://api.github.com/users/perrygeo","html_url":"https://github.com/perrygeo","followers_url":"https://api.github.com/users/perrygeo/followers","following_url":"https://api.github.com/users/perrygeo/following{/other_user}","gists_url":"https://api.github.com/users/perrygeo/gists{/gist_id}","starred_url":"https://api.github.com/users/perrygeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perrygeo/subscriptions","organizations_url":"https://api.github.com/users/perrygeo/orgs","repos_url":"https://api.github.com/users/perrygeo/repos","events_url":"https://api.github.com/users/perrygeo/events{/privacy}","received_events_url":"https://api.github.com/users/perrygeo/received_events","type":"User","site_admin":false},"body":"This PR updates fixtures and hint logic for some additional topics covered by the [draft IETF GeoJSON spec](https://github.com/geojson/draft-geojson). This includes:\r\n\r\n* [x] objects may have extensions\r\n* [x] position should not have > 3 elements\r\n* [x] No geometries with \"features\", \"geometry\", \"properties\".\r\n* [x] No features with \"features\", \"coordinates\".\r\n* [x] No collections with \"properties\", \"coordinates\".\r\n* [x] GeoJSON types should be case-sensitive\r\n* [x] Should not have single-geometry geometry collections\r\n* [x] Should not have empty or null geometry collections\r\n* [x] Should not have nested geometry collections\r\n* [x] Right-Hand Rule for (multi)polygons\r\n* [x] Warn if > x decimal places precision\r\n* [x] specifying any `crs` object is not recommended\r\n* [x] bbox should be an array of 4 or 6 numeric elements\r\n\r\nI'm feeling pretty good about the test cases but this is not quite ready yet. TODO\r\n\r\n* [ ] coding style review for changes in object.js (the `for` loops reveal my rusty old school javascript)\r\n* [ ] generally, are there better ways to structure the additional logic?\r\n* [ ] review error messages for sentence case, quotes, language consistency and reserved words (should, must, etc)\r\n* [ ] The IETF spec recommends provisions for geometries and bboxs that cross the anti-meridian yet this is difficult to test for since it is non-deterministic (e.g. any multi-position geometry or collection could *theoretically* cross the antimeridian). I'm skeptical of putting in heuristics to detect this case.\r\n* [ ] I chose a threshold of 9 decimal places max to warn about excessive precision. Any more detail and we're outside of the range of professional survey equipment.\r\n* [ ] I'd like another set of eyes to make sure my interpretation of the spec is correct and that nothing has been omitted.\r\n* [ ] Need to benchmark and profile the code; adding the right hand rule and other constructs *may* slow it down on large datasets and I'd like to quantify that and identify any hotspots that we could optimize.\r\n* [ ] Per chat with @tmcw : Since many of the new constructs are not strictly required/prohibited, we may want to introduce the concept of warning levels. A list of \"errors\" vs \"warnings\" might be sufficient?\r\n\r\n/cc @tmcw @sgillies \r\n","created_at":"2016-03-10T17:52:57Z","updated_at":"2016-03-14T14:14:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f52b8f54a14cf8ba7cb67d86f3e6462b339373cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37/commits","review_comments_url":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37/comments","review_comment_url":"https://api.github.com/repos/mapbox/geojsonhint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapbox/geojsonhint/issues/37/comments","statuses_url":"https://api.github.com/repos/mapbox/geojsonhint/statuses/223a2f13225df0bc24d9ea32fcb6c926aef27418","head":{"label":"mapbox:ietfify","ref":"ietfify","sha":"223a2f13225df0bc24d9ea32fcb6c926aef27418","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":11635008,"name":"geojsonhint","full_name":"mapbox/geojsonhint","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/geojsonhint","description":"validate geojson objects against the specification","fork":false,"url":"https://api.github.com/repos/mapbox/geojsonhint","forks_url":"https://api.github.com/repos/mapbox/geojsonhint/forks","keys_url":"https://api.github.com/repos/mapbox/geojsonhint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/geojsonhint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/geojsonhint/teams","hooks_url":"https://api.github.com/repos/mapbox/geojsonhint/hooks","issue_events_url":"https://api.github.com/repos/mapbox/geojsonhint/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/geojsonhint/events","assignees_url":"https://api.github.com/repos/mapbox/geojsonhint/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/geojsonhint/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/geojsonhint/tags","blobs_url":"https://api.github.com/repos/mapbox/geojsonhint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/geojsonhint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/geojsonhint/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/geojsonhint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/geojsonhint/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/geojsonhint/languages","stargazers_url":"https://api.github.com/repos/mapbox/geojsonhint/stargazers","contributors_url":"https://api.github.com/repos/mapbox/geojsonhint/contributors","subscribers_url":"https://api.github.com/repos/mapbox/geojsonhint/subscribers","subscription_url":"https://api.github.com/repos/mapbox/geojsonhint/subscription","commits_url":"https://api.github.com/repos/mapbox/geojsonhint/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/geojsonhint/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/geojsonhint/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/geojsonhint/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/geojsonhint/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/geojsonhint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/geojsonhint/merges","archive_url":"https://api.github.com/repos/mapbox/geojsonhint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/geojsonhint/downloads","issues_url":"https://api.github.com/repos/mapbox/geojsonhint/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/geojsonhint/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/geojsonhint/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/geojsonhint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/geojsonhint/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/geojsonhint/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/geojsonhint/deployments","created_at":"2013-07-24T13:08:38Z","updated_at":"2016-03-11T11:59:51Z","pushed_at":"2016-03-10T17:52:57Z","git_url":"git://github.com/mapbox/geojsonhint.git","ssh_url":"git@github.com:mapbox/geojsonhint.git","clone_url":"https://github.com/mapbox/geojsonhint.git","svn_url":"https://github.com/mapbox/geojsonhint","homepage":"https://www.mapbox.com/geojsonhint/","size":238,"stargazers_count":83,"watchers_count":83,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":5,"forks":8,"open_issues":5,"watchers":83,"default_branch":"master"}},"base":{"label":"mapbox:master","ref":"master","sha":"00fcdbdc0c3daf319715f490f195d342d970f61a","user":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"repo":{"id":11635008,"name":"geojsonhint","full_name":"mapbox/geojsonhint","owner":{"login":"mapbox","id":600935,"avatar_url":"https://avatars.githubusercontent.com/u/600935?v=3","gravatar_id":"","url":"https://api.github.com/users/mapbox","html_url":"https://github.com/mapbox","followers_url":"https://api.github.com/users/mapbox/followers","following_url":"https://api.github.com/users/mapbox/following{/other_user}","gists_url":"https://api.github.com/users/mapbox/gists{/gist_id}","starred_url":"https://api.github.com/users/mapbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapbox/subscriptions","organizations_url":"https://api.github.com/users/mapbox/orgs","repos_url":"https://api.github.com/users/mapbox/repos","events_url":"https://api.github.com/users/mapbox/events{/privacy}","received_events_url":"https://api.github.com/users/mapbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapbox/geojsonhint","description":"validate geojson objects against the specification","fork":false,"url":"https://api.github.com/repos/mapbox/geojsonhint","forks_url":"https://api.github.com/repos/mapbox/geojsonhint/forks","keys_url":"https://api.github.com/repos/mapbox/geojsonhint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapbox/geojsonhint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapbox/geojsonhint/teams","hooks_url":"https://api.github.com/repos/mapbox/geojsonhint/hooks","issue_events_url":"https://api.github.com/repos/mapbox/geojsonhint/issues/events{/number}","events_url":"https://api.github.com/repos/mapbox/geojsonhint/events","assignees_url":"https://api.github.com/repos/mapbox/geojsonhint/assignees{/user}","branches_url":"https://api.github.com/repos/mapbox/geojsonhint/branches{/branch}","tags_url":"https://api.github.com/repos/mapbox/geojsonhint/tags","blobs_url":"https://api.github.com/repos/mapbox/geojsonhint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapbox/geojsonhint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapbox/geojsonhint/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapbox/geojsonhint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapbox/geojsonhint/statuses/{sha}","languages_url":"https://api.github.com/repos/mapbox/geojsonhint/languages","stargazers_url":"https://api.github.com/repos/mapbox/geojsonhint/stargazers","contributors_url":"https://api.github.com/repos/mapbox/geojsonhint/contributors","subscribers_url":"https://api.github.com/repos/mapbox/geojsonhint/subscribers","subscription_url":"https://api.github.com/repos/mapbox/geojsonhint/subscription","commits_url":"https://api.github.com/repos/mapbox/geojsonhint/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapbox/geojsonhint/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapbox/geojsonhint/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapbox/geojsonhint/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapbox/geojsonhint/contents/{+path}","compare_url":"https://api.github.com/repos/mapbox/geojsonhint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapbox/geojsonhint/merges","archive_url":"https://api.github.com/repos/mapbox/geojsonhint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapbox/geojsonhint/downloads","issues_url":"https://api.github.com/repos/mapbox/geojsonhint/issues{/number}","pulls_url":"https://api.github.com/repos/mapbox/geojsonhint/pulls{/number}","milestones_url":"https://api.github.com/repos/mapbox/geojsonhint/milestones{/number}","notifications_url":"https://api.github.com/repos/mapbox/geojsonhint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapbox/geojsonhint/labels{/name}","releases_url":"https://api.github.com/repos/mapbox/geojsonhint/releases{/id}","deployments_url":"https://api.github.com/repos/mapbox/geojsonhint/deployments","created_at":"2013-07-24T13:08:38Z","updated_at":"2016-03-11T11:59:51Z","pushed_at":"2016-03-10T17:52:57Z","git_url":"git://github.com/mapbox/geojsonhint.git","ssh_url":"git@github.com:mapbox/geojsonhint.git","clone_url":"https://github.com/mapbox/geojsonhint.git","svn_url":"https://github.com/mapbox/geojsonhint","homepage":"https://www.mapbox.com/geojsonhint/","size":238,"stargazers_count":83,"watchers_count":83,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":5,"forks":8,"open_issues":5,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37"},"html":{"href":"https://github.com/mapbox/geojsonhint/pull/37"},"issue":{"href":"https://api.github.com/repos/mapbox/geojsonhint/issues/37"},"comments":{"href":"https://api.github.com/repos/mapbox/geojsonhint/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/mapbox/geojsonhint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapbox/geojsonhint/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/mapbox/geojsonhint/statuses/223a2f13225df0bc24d9ea32fcb6c926aef27418"}}}}