本文整理汇总了TypeScript中@turf/helpers.multiPoint函数的典型用法代码示例。如果您正苦于以下问题:TypeScript multiPoint函数的具体用法?TypeScript multiPoint怎么用?TypeScript multiPoint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了multiPoint函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: multiPoint
import {multiPoint} from '@turf/helpers'
import * as cleanCoords from './'
// Fixtures
const multiPt = multiPoint([[0, 0], [0, 0], [2, 2]])
// Feature
cleanCoords(multiPt).geometry
cleanCoords(multiPt).properties
// Geometry
cleanCoords(multiPt.geometry).coordinates
cleanCoords(multiPt.geometry).type
// Input mutation
cleanCoords(multiPt.geometry, true)
示例2: point
} from '@turf/helpers'
import buffer from './'
// Standard Geometry
const pt = point([100, 0]);
const line = lineString([[100, 0], [50, 0]]);
const poly = polygon([[[100, 0], [50, 0], [0, 50], [100, 0]]]);
buffer(pt, 5);
buffer(line, 5);
buffer(poly, 5);
buffer(pt, 5, {units: 'miles'});
buffer(pt, 10, {units: 'meters', steps: 64});
// Multi Geometry
const multiPt = multiPoint([[100, 0], [0, 100]]);
const multiLine = multiLineString([[[100, 0], [50, 0]], [[100, 0], [50, 0]]]);
const multiPoly = multiPolygon([[[[100, 0], [50, 0], [0, 50], [100, 0]]], [[[100, 0], [50, 0], [0, 50], [100, 0]]]]);
buffer(multiPt, 5);
buffer(multiLine, 5);
buffer(multiPoly, 5);
// Collections
const fc = featureCollection<Point|LineString>([pt, line]);
const gc = geometryCollection([pt.geometry, line.geometry]);
buffer(fc, 5);
buffer(gc, 5);
// Mixed Collections