Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
turf max module
turf.max(polygons, points, inField, outField)
Calculates the maximum value of a field for points within a set of polygons.
parameter | type | description |
---|---|---|
polygons | FeatureCollection | a FeatureCollection of Polygon features |
points | FeatureCollection | a FeatureCollection of Point features |
inField | string | the field in input data to analyze |
outField | string | the field in which to store results |
var polygons = turf.featurecollection([
turf.polygon([[
[101.551437, 3.150114],
[101.551437, 3.250208],
[101.742324, 3.250208],
[101.742324, 3.150114],
[101.551437, 3.150114]
]]),
turf.polygon([[
[101.659927, 3.011612],
[101.659927, 3.143944],
[101.913986, 3.143944],
[101.913986, 3.011612],
[101.659927, 3.011612]
]])
]);
var points = turf.featurecollection([
turf.point([101.56105, 3.213874], {population: 200}),
turf.point([101.709365, 3.211817], {population: 600}),
turf.point([101.645507, 3.169311], {population: 100}),
turf.point([101.708679, 3.071266], {population: 200}),
turf.point([101.826782, 3.081551], {population: 300})]);
var aggregated = turf.max(
polygons, points, 'population', 'max');
var result = turf.featurecollection(
points.features.concat(aggregated.features));
//=result
Requires nodejs.
$ npm install turf-max
$ npm test
FAQs
turf max module
The npm package turf-max receives a total of 52 weekly downloads. As such, turf-max popularity was classified as not popular.
We found that turf-max demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.