turf-sample:取一个特征集合,返回N个随机特征作为特征集合

时间:2024-07-05 15:51:11
【文件属性】:

文件名称:turf-sample:取一个特征集合,返回N个随机特征作为特征集合

文件大小:4KB

文件格式:ZIP

更新时间:2024-07-05 15:51:11

JavaScript

草皮样品 草皮样品模块 turf.sample(features, n) 获取一个 FeatureCollection 并随机返回一个具有给定数量的 Feature|features 的 FeatureCollection。 参数 范围 类型 描述 features 功能集 输入特征集 n 数字 要选择的功能数量 例子 var points = turf . random ( 'points' , 1000 ) ; //=points var sample = turf . sample ( points , 10 ) ; //=sample 返回FeatureCollection ,一个具有n特征的 FeatureCollection 安装 需要 。 $ npm install turf-sample 测试 $ npm test


【文件预览】:
turf-sample-master
----.gitignore(545B)
----README.md(899B)
----LICENSE(1KB)
----bench.js(672B)
----package.json(780B)
----index.js(1KB)
----test.js(551B)
----.travis.yml(36B)

网友评论