Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

blackrez/turf-isvalid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turf-isvalid

build status

Test if a geometry is valid or not

turf.valid(Feature)

Parameters

parameter type description
Feature Feature input to be tested if valid or not

Example

var poly = {
  "type": "Feature",
  "properties": {
    "fill": "#0f0"
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-122.801742, 45.48565],
    ]]
  }
}

var isvald = turf.valid(poly);
console.log(isvald)
//=false

Returns Boolean,

Installation

Requires nodejs.

$ npm install turf-isvalid

Tests

$ npm test

About

A module to test is an geometry is valid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published