Socket
Socket
Sign inDemoInstall

turf-hex

Package Overview
Dependencies
1
Maintainers
8
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    turf-hex

turf hex module


Version published
Weekly downloads
3
decreased by-25%
Maintainers
8
Created
Weekly downloads
 

Readme

Source

turf-hex

build status

turf hex module

turf.hex(bbox, size)

Takes a bounding box and a cell size in degrees and returns a FeatureCollection of flat-topped hexagons (Polygon features) aligned in an "odd-q" vertical grid as described in Hexagonal Grids

Parameters

parametertypedescription
bboxArray.bounding box in [minX, minY, maxX, maxY] order
sizeNumbersize of cells in degrees

Example

var bbox = [7.2669410, 43.695307, 7.2862529, 43.706476];
var size = 0.001;

var hexgrid = turf.hex(bbox, size);

//=hexgrid

Installation

Requires nodejs.

$ npm install turf-hex

Tests

$ npm test

Keywords

FAQs

Last updated on 06 Feb 2015

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc