Test if a geometry is valid or not
npm install turf-isvalid
Test if a geometry is valid or not
| parameter | type | description |
| --------- | ------- | ---------------------------------- |
| Feature | Feature | input to be tested if valid or not |
``js
var poly = {
"type": "Feature",
"properties": {
"fill": "#0f0"
},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-122.801742, 45.48565],
]]
}
}
var isvald = turf.valid(poly);
console.log(isvald)
//=true
`
Returns Boolean,
Requires nodejs.
`sh`
$ npm install turf-isvalid
`sh``
$ npm test