booleanPointInPolygon
描述
🌐 Description
接受一个点和一个多边形或多多边形,并确定该点是否位于多边形内。多边形可以是凸的或凹的。该函数会考虑孔洞。
🌐 Takes a Point and a Polygon or MultiPolygon and determines if the point resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.
参数
🌐 Parameters
| 名称 | 类型 | 描述 |
|---|---|---|
| point | Coord | 输入点 |
| polygon | Feature<Polygon | MultiPolygon> | 输入多边形或多重多边形 |
| options? | Object | 可选参数 (默认 {}) |
| options.ignoreBoundary? | boolean | 如果在判断点是否在多边形内时应忽略多边形边界则为真,否则为假。 (默认 false) |
返回
🌐 Returns
boolean 如果点在多边形内,则为true;如果点不在多边形内,则为false