
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
random-points-generator
Advanced tools
Generates n random points based on @turf/random.
The value added regarding @turf/random is the filter. Indeed, here points can be generated inside a GeoJSON polygon.
And it comes with :
$ npm i random-points-generator
or
yarn add random-points-generator
or
pnpm add random-points-generator
<script src="https://unpkg.com/random-points-generator"></script>
<script>
const fc = geotools.random(5);
</script>
| Name | Description | Type | Default |
|---|---|---|---|
number | number of points to generate | Integer | 10 |
options | random options | Object | undefined |
returns a FeatureCollection of Points
options
Options | Description |
|---|---|
bbox | Array extent in [ minX, minY, maxX, maxY ] order which means (southwest lng, lat northeast lng,lat) |
features | GeoJSON polygons as features or a FeatureCollection |
unkink | true|false [Default is true] Unkink Polygon (see) before processing the features |
buffer | {radius: number, options?} [Default is {}] Apply a buffer (see) before processing the features |
ESM
import RandomGenerator from 'random-points-generator';
console.log(JSON.stringify(RandomGenerator.random(5)));
will output something like :
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-57.67197760979268,42.78314165298585]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[72.83765393077084,-59.52263527885765]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[54.502068476617396,-60.928402442511306]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-22.331900675385647,39.51543790400138]}},{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-149.45526699981158,-74.96319889821024]}}]}
CJS
const RandomGenerator = require('random-points-generator');
const points = RandomGenerator.random(3);
console.log(JSON.stringify(points));
will output something like :
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[126.41316810428155,-47.548372609587574]},"properties":{}},{"type":"Feature","geometry":{"type":"Point","coordinates":[97.69989737806617,-47.200575920302434]},"properties":{}},{"type":"Feature","geometry":{"type":"Point","coordinates":[24.264802630637277,72.69680002654108]},"properties":{}}]}
cd random-points-generatornpm install./bin/random-points-generator --help to get optionsUsage: bin/random-points-generator [options]
Options:
--help, -h Show help [boolean]
--number, -n [default: 10]
--verbose, -v [default: false]
Examples:
bin/random-points-generator Generates 10 random coordinates,
output to console in GeoJSON format
bin/random-points-generator -n 1000 Generates 1000 random coordinates
--xmin=-2 --xmax=4 --ymin=-45 --ymax=50 with these bounding box
bin/random-points-generator -i Generates 10 random coordinates
world_countries.geojson within polygons from file
world_countries.geojson
TODO
| Version | Date | Description |
|---|---|---|
v2.1.0-beta.1 | 05/08/2025 | Take an optional buffer into account with GeoJSON features |
v2.0.0 | 07/07/2025 | Release v2 |
v2.0.0-beta.3 | 01/07/2025 | Export default |
v2.0.0-beta.2 | 30/06/2025 | Improves doc and upgrade deps |
v2.0.0-beta.1 | 23/06/2025 | Refactor using TypeScript and Vitest |
v1.10.0 | 23/06/2025 | Upgrade deps packages |
v1.9.1 | 03/11/2024 | deps: Eslint 9 and pnpm |
v1.9.0 | 29/07/2024 | Upgrade deps packages |
v1.8.0 | 26/01/2023 | Adds optional unkink polygons parameter |
v1.7.6 | 31/03/2021 | Upgrade deps packages |
v1.7.5 | 22/11/2020 | Upgrade deps packages |
v1.7.4 | 09/12/2019 | Upgrade deps packages |
v1.7.3 | 09/12/2019 | Upgrade deps packages |
v1.7.2 | 16/08/2019 | Upgrade deps packages |
v1.7.1 | 16/08/2019 | Build removes node 6 |
v1.7.0 | 14/08/2019 | Build / test on node 10 |
v1.6.1 | 10/12/2018 | Missing Built Files |
v1.6.0 | 10/12/2018 | Upgrade deps packages |
v1.5.2 | 01/05/2018 | fixes unnecessary verbose message |
v1.5.0 | 25/03/2018 | add a browser package |
v1.4.0 | 20/02/2018 | Use single turf modules |
v1.3.0 | 07/11/2017 | Unkink input polygons |
v1.2.0 | 21/05/2017 | Rewrite with es6 notation |
v1.1.0 | 25/04/2017 | Split command line and lib |
v1.0.0 | 03/10/2016 | Creation : a tool command line |
resources folder contains Large Scale Data from Natural Earth
Licensed under the MIT License
A copy of the license is available in the repository's LICENSE file.
FAQs
Random points generator
The npm package random-points-generator receives a total of 38 weekly downloads. As such, random-points-generator popularity was classified as not popular.
We found that random-points-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.