Gathering detailed insights and metrics for @spatial/hex-grid
Gathering detailed insights and metrics for @spatial/hex-grid
Gathering detailed insights and metrics for @spatial/hex-grid
Gathering detailed insights and metrics for @spatial/hex-grid
A modular geospatial engine written in JavaScript and TypeScript
npm install @spatial/hex-grid
Typescript
Module System
Node Version
NPM Version
TypeScript (86.94%)
JavaScript (13.05%)
Shell (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9,841 Stars
3,791 Commits
981 Forks
179 Watchers
48 Branches
177 Contributors
Updated on Jul 14, 2025
Latest Version
1.0.5
Package Id
@spatial/hex-grid@1.0.5
Unpacked Size
27.48 kB
Size
4.87 kB
File Count
7
NPM Version
lerna/3.16.4/node@v10.16.0+x64 (linux)
Node Version
10.16.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Takes a bounding box and the diameter of the cell and returns a FeatureCollection of flat-topped hexagons or triangles (Polygon features) aligned in an "odd-q" vertical grid as described in Hexagonal Grids.
bbox
BBox extent in [minX, minY, maxX, maxY] ordercellSide
number length of the side of the the hexagons or triangles, in units. It will also coincide with the
radius of the circumcircle of the hexagons.options
Object Optional parameters (optional, default {}
)
options.units
string used in calculating cell size, can be degrees, radians, miles, or kilometers (optional, default 'kilometers'
)options.properties
Object passed to each hexagon or triangle of the grid (optional, default {}
)options.mask
Feature<(Polygon | MultiPolygon)>? if passed a Polygon or MultiPolygon, the grid Points will be created only inside itoptions.triangles
boolean whether to return as triangles instead of hexagons (optional, default false
)1var bbox = [-96,31,-84,40]; 2var cellSide = 50; 3var options = {units: 'miles'}; 4 5var hexgrid = turf.hexGrid(bbox, cellSide, options); 6 7//addToMap 8var addToMap = [hexgrid];
Returns FeatureCollection<Polygon> a hexagonal grid
This module is part of the Turfjs project, an open source module collection dedicated to geographic algorithms. It is maintained in the Turfjs/turf repository, where you can create PRs and issues.
Install this module individually:
1$ npm install @spatial/hex-grid
Or install the Turf module that includes it as a function:
1$ npm install @turf/turf
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
all changesets reviewed
Reason
25 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
project is fuzzed
Details
Reason
all dependencies are pinned
Details
Reason
7 existing vulnerabilities detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More