{"name":"geojsonhint","description":"validate and sanity-check geojson files","version":"2.0.0-beta1","author":{"name":"Tom MacWright"},"bin":{"geojsonhint":"./bin/geojsonhint"},"bugs":{"url":"https://github.com/mapbox/geojsonhint/issues"},"files":["geojsonhint.js","lib"],"dependencies":{"concat-stream":"~1.5.1","jsonlint-lines":"1.7.1","minimist":"1.2.0","vfile":"2.0.0","vfile-reporter":"3.0.0"},"devDependencies":{"benchmark":"^2.1.0","browserify":"13.1.0","eslint":"^3.0.1","fuzzer":"~0.2.0","glob":"~7.0.5","tap":"7.0.0"},"directories":{"test":"test"},"keywords":["geojson","hint"],"license":"ISC","main":"lib/index.js","repository":{"type":"git","url":"git://github.com/mapbox/geojsonhint.git"},"scripts":{"test":"eslint . && tap test/*.js --coverage","prepublish":"browserify . --standalone geojsonhint > geojsonhint.js"},"gitHead":"aaae73ebce2ab1ec952b46130edde1b6c6090241","homepage":"https://github.com/mapbox/geojsonhint#readme","_id":"geojsonhint@2.0.0-beta1","_shasum":"322c81f03ee56a9bc6cdc2a0f3e14a40459167a0","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"tmcw","email":"tom@macwright.org"},"dist":{"shasum":"322c81f03ee56a9bc6cdc2a0f3e14a40459167a0","tarball":"http://registry-npm.ywwl.com/geojsonhint/download/geojsonhint-2.0.0-beta1.tgz","integrity":"sha512-wivbKcWMBYpy4cRJriIG0pga8jUxhIF7vS12j1ck+CfxV/S66iwl+0gEoLq2fXF0ejZrsnTHS90DOznR8lXyQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICIPu9B8a2jKdhad3dOBaM7tgRgL5+kx8zYoLRM4UnN1AiEAlUtr8KMRBHnRPormrry/OgRjWWiXRssFjgIvGs2808g="}],"size":21326,"noattachment":false,"key":"/geojsonhint/-/geojsonhint-2.0.0-beta1.tgz"},"maintainers":[{"name":"aaronlidman","email":"aaronlidman@gmail.com"},{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"camilleanne","email":"camille@mapbox.com"},{"name":"dthompson","email":"dthompson@gmail.com"},{"name":"gretacb","email":"carol@mapbox.com"},{"name":"ianshward","email":"ian@mapbox.com"},{"name":"ingalls","email":"nicholas.ingalls@gmail.com"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"kkaefer","email":"kkaefer@gmail.com"},{"name":"lxbarth","email":"alex@mapbox.com"},{"name":"mapbox-admin","email":"accounts@mapbox.com"},{"name":"miccolis","email":"jeff@miccolis.net"},{"name":"mikemorris","email":"michael.patrick.morris@gmail.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"mourner","email":"agafonkin@gmail.com"},{"name":"rclark","email":"ryan.clark.j@gmail.com"},{"name":"springmeyer","email":"dane@mapbox.com"},{"name":"tmcw","email":"tom@macwright.org"},{"name":"tristen","email":"tristen.brown@gmail.com"},{"name":"willwhite","email":"will@mapbox.com"},{"name":"yhahn","email":"young@mapbox.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/geojsonhint-2.0.0-beta1.tgz_1472568301000_0.5421009608544409"},"readme":"[![Build Status](https://secure.travis-ci.org/mapbox/geojsonhint.svg?branch=master)](http://travis-ci.org/mapbox/geojsonhint) [![Coverage Status](https://coveralls.io/repos/mapbox/geojsonhint/badge.svg)](https://coveralls.io/r/mapbox/geojsonhint)\n\n# geojsonhint: complete, fast, standards-based validation for geojson\n\nA [lint](http://bit.ly/12jjJyW) tool for the [GeoJSON](http://www.geojson.org/)\nstandard. geojsonhint is written _to the standard_, with no missing or additional\nopinions about structure.\n\nThanks to `jsonlint-lines`, GeoJSON that is also not valid [JSON](http://json.org/)\ncan return informative, line-oriented parsing errors.\n\n## Specification\n\nThe basis of this tool is the published [GeoJSON](http://www.geojson.org/) 1.0 specification.\nIn the few cases where [draft-geojson](https://github.com/geojson/draft-geojson/blob/master/middle.mkd),\nthe ietf-candidate version of GeoJSON, is more precise (for instance, [the id property](https://github.com/mapbox/geojsonhint/issues/24)), the validator follows the draft spec as well.\n\n## API\n\n`errors = geojsonhint.hint(string or object, options)`\n\nLint a file, given as a string or object. This call detects all aberrations from\nthe GeoJSON standards and returns them as an array of errors. An example of the output:\n\n```json\n[{\n  \"message\": \"\\\"features\\\" property should be an array, but is an object instead\",\n  \"line\": 1\n}]\n```\n\nThe options argument is optional. It has these options:\n\n`noDuplicateMembers`.\n\nBy default, geojsonhint will treat repeated properties as an error: you can\nset noDuplicateMembers to false to allow them. For instance:\n\n```js\ngeojsonhint.hint('{\"type\":\"invalid\",\"type\":\"Feature\",\"properties\":{},\"geometry\":null}', {\n    noDuplicateMembers: false\n});\n```\n\nThe repeated `type` property in this input will be ignored with the option,\nand flagged without it.\n\n\n`precisionWarning`.\n\nGeoJSON [now recommends six decimal places of accuracy](https://tools.ietf.org/html/rfc7946#section-11.2)\nfor coordinates (Section 11.2). This option adds a warning message when coordinates\ncontain over 6 decimal places of accuracy, up to 10 coordinates before the warning\nmessage is truncated for performance.\n\n```js\ngeojsonhint.hint('{ \"type\": \"Point\", \"coordinates\": [100.0000000001, 5.0000000001] }', {\n    precisionWarning: false\n});\n```\n\nWith this option enabled, geojsonhint will produce these warnings:\n\n```js\n[{\n  line: 1,\n  level: 'message',\n  message: 'precision of coordinates should be reduced'\n}, {\n  line: 1,\n  level: 'message',\n  message: 'precision of coordinates should be reduced'\n}]\n```\n\nWithout this option, this input will pass without errors.\n\n## Line Numbers\n\nNote that the GeoJSON can be given as a **string or as an object**. Here's how\nto choose which input to use:\n\n* `string` inputs receive **line numbers for each error**. These make errors\n  easier to track down if the GeoJSON is hand-written.\n* `object` inputs don't have line numbers but are evaluated faster, by up to 10x.\n  GeoJSONHint is _very fast already_ so unless you have identified it as a\n  bottleneck in your application, don't [prematurely optimize](http://c2.com/cgi/wiki?PrematureOptimization) based\n  on this fact.\n\nIf you're really trying to save space and don't care about JSON validity errors -\nonly GeoJSON errors - you can `require('geojsonhint/lib/object')` to get a version\nof this library that bypasses jsonlint-lines and provides only the object\ninterface.\n\n## use it\n\n**npm** (node.js, browserify, webpack, etc)\n\n    npm install --save geojsonhint\n\n**CDN / script tag**\n\nHit this URL to resolve to the latest pinned version.\n\n    https://unpkg.com/geojsonhint@latest/geojsonhint.js\n\n## As a command-line utility\n\nInstall:\n\n    npm install -g geojsonhint\n\n```\n➟ geojsonhint\nUsage: geojsonhint FILE.geojson\n\nOptions:\n  --json  output json-formatted data for hints\n```\n\n```\n➟ geojsonhint test.geojson\nline 9, each element in a position must be a number\n```\n\n## Development\n\n* Tests: `npm test`\n* Building the browser version: `npm run build`\n\n## See Also\n\n* [geojsonhint online](https://www.mapbox.com/geojsonhint/)\n* [grunt-geojsonhint](https://github.com/jieter/grunt-geojsonhint) does it as a Grunt task\n* [geojsonlint.com](http://geojsonlint.com/) does this server-side\n* [GeoJSON-Validation](https://github.com/craveprogramminginc/GeoJSON-Validation) is another node module for this.\n* [geojson-assert](https://github.com/calvinmetcalf/geojson-assert) does it in assertion tests\n* [geojsonlint](https://github.com/ropenscilabs/geojsonlint) does it in an R package\n","publish_time":1472568303068,"_cnpm_publish_time":1472568303068,"dist-tags":{"latest":"2.0.0"}}