turf-tag

WebJar for turf-tag

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

turf-tag
Последняя версия

Последняя версия

3.0.12
Дата

Дата

Тип

Тип

jar
Описание

Описание

turf-tag
WebJar for turf-tag
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/turf-junkyard/turf-tag

Скачать turf-tag

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/turf-tag/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>turf-tag</artifactId>
    <version>3.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/turf-tag/
implementation 'org.webjars.npm:turf-tag:3.0.12'
// https://jarcasting.com/artifacts/org.webjars.npm/turf-tag/
implementation ("org.webjars.npm:turf-tag:3.0.12")
'org.webjars.npm:turf-tag:jar:3.0.12'
<dependency org="org.webjars.npm" name="turf-tag" rev="3.0.12">
  <artifact name="turf-tag" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='turf-tag', version='3.0.12')
)
libraryDependencies += "org.webjars.npm" % "turf-tag" % "3.0.12"
[org.webjars.npm/turf-tag "3.0.12"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : turf-inside jar [3.0.12,4)

Модули Проекта

Данный проект не имеет модулей.

turf-tag

build status

turf tag module

turf.tag(points, polygons, polyId, containingPolyId)

Takes a set of Point|points and a set of Polygon|polygons and performs a spatial join.

Parameters

parameter type description
points FeatureCollection.<Point> input points
polygons FeatureCollection.<Polygon> input polygons
polyId String property in polygons to add to joined Point features
containingPolyId String property in points in which to store joined property from `polygons

Example

var bbox = [0, 0, 10, 10];
// create a triangular grid of polygons
var triangleGrid = turf.triangleGrid(bbox, 50, 'miles');
triangleGrid.features.forEach(function(f) {
  f.properties.fill = '#' +
    (~~(Math.random() * 16)).toString(16) +
    (~~(Math.random() * 16)).toString(16) +
    (~~(Math.random() * 16)).toString(16);
  f.properties.stroke = 0;
  f.properties['fill-opacity'] = 1;
});
var randomPoints = turf.random('point', 30, {
  bbox: bbox
});
var both = turf.featurecollection(
  triangleGrid.features.concat(randomPoints.features));

//=both

var tagged = turf.tag(randomPoints, triangleGrid,
                      'fill', 'marker-color');

//=tagged

Returns FeatureCollection.<Point>, points with containingPolyId property containing values from polyId

Installation

Requires nodejs.

$ npm install turf-tag

Tests

$ npm test
org.webjars.npm

deprecated turf modules: do not use or reference, for redirects only

turf is now a monorepo: all turf modules are in Turfjs/turf

Версии библиотеки

Версия
3.0.12