Giter VIP home page Giter VIP logo

check-geojson's Introduction

check-geojson

check-geojson development is supported by ๐ŸŒŽ placemark.io

geojsonhint for 2021.

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.

Main differences from geojsonhint

  • Actively maintained
  • Written in TypeScript and includes types
  • Uses momoa to parse JSON instead of a homemade parser. This is probably the biggest one. jsonlint-lines was a hack, which I created because I could not find a single parser that actually parsed JSON and gave line numbers for values. momoa is much better than that hack, and using it makes line-level errors much cleaner.

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

  • excessive coordinate precision
  • right-hand rule compliance

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.

Usage

Not finalized yet

import { check } from "check-geojson"

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

Maintainability Test Coverage

check-geojson's People

Contributors

deepsourcebot avatar tmcw avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.