Home

Awesome

check-geojson

check-geojson development is supported by 🌎 placemark.io

geojsonhint for 2023.

I started working on geojsonhint in 2014. It's a pretty useful project. But it has been stagnant for a long time now, and has some annoying long-term issues.

check-geojson is intended to be a full successor for geojsonhint. Like geojsonhint, it is tailored to a particular usecase: writing GeoJSON by hand, or quickly sussing out issues in GeoJSON that you've received.

📕 API Documentation

Main differences from geojsonhint

Unlike geojsonhint, this checker only produces errors, not warnings. So things that geojsonhint would warn about, like:

This does not check for. Additionally, the crs member is ignored by this tool: as of the latest GeoJSON specification, this is not used.

We're using the same test fixtures as geojsonhint as a starter.

Install

pnpm add @placemarkio/check-geojson
yarn add @placemarkio/check-geojson

Usage

Not finalized yet

import { check } from "@placemarkio/check-geojson"

try {
  const parseValue = check('… geojson string …')
} catch (e) {
  /// e.issues
}

Maintainability Test Coverage