Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
validate geojson objects against the specification
JavaScript Makefile

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
test
.travis.yml
Makefile
README.md
geojsonhint.js
index.js
package.json

README.md

Build Status

geojson lint in js

A lint tool for the GeoJSON standard.

api

errors = geojsonhint.hint(fileAsString)

Lint a file - given as a string - with the GeoJSON expectations baked in. An example of the output:

[{
  "message": "\"features\" property should be an array, but is an object instead",
  "line": 1
}]

use it

as a library

npm install --save geojsonhint

as a web library

curl https://raw.github.com/tmcw/geojsonhint/master/geojsonhint.js > geojsonhint.js

binary

Install:

npm install -g geojsonhint
 tmcw➟ geojsonhint
Usage: node /usr/local/share/npm/bin/geojsonhint FILE.geojson

Options:
  --json  output json-formatted data for hints
➟ geojsonhint test.geojson
line 9, each element in a position must be a number

developing

Tests:

npm test

Building the browser version:

npm install -g browserify
make

See Also

geojsonlint.com does this server-side

Something went wrong with that request. Please try again.