Socket
Socket
Sign inDemoInstall

turf-square

Package Overview
Dependencies
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-square

turf square module


Version published
Weekly downloads
12K
decreased by-4.32%
Maintainers
9
Weekly downloads
 
Created
Source

turf-square

build status

turf square module

turf.square(bbox)

Takes a bounding box and calculates the minimum square bounding box that would contain the input.

Parameters

parametertypedescription
bboxArray.<number>a bounding box

Example

var bbox = [-20,-20,-15,0];

var squared = turf.square(bbox);

var features = {
  "type": "FeatureCollection",
  "features": [
    turf.bboxPolygon(bbox),
    turf.bboxPolygon(squared)
  ]
};

//=features

Returns Array.<number>, a square surrounding bbox

Installation

Requires nodejs.

$ npm install turf-square

Tests

$ npm test

Keywords

FAQs

Package last updated on 16 May 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc