Skip to main content
Version: 7.2.0

booleanConcave

描述

¥Description

获取一个多边形,并返回 true 或 false,以判断其是否为凹多边形。

¥Takes a polygon and return true or false as to whether it is concave or not.

参数

¥Parameters

名称类型描述
polygon特性<多边形>待求值

返回

¥Returns

boolean 真/假

¥boolean true/false

示例

¥Examples

var convexPolygon = turf.polygon([
[
[0, 0],
[0, 1],
[1, 1],
[1, 0],
[0, 0],
],
]);

turf.booleanConcave(convexPolygon);
//=false

安装

¥Installation

$ npm install @turf/boolean-concave

import { booleanConcave } from "@turf/boolean-concave";
const result = booleanConcave(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.booleanConcave(...);