square
Description
Takes a bounding box and calculates the minimum square bounding box that would contain the input.
Parameters
Name | Type | Description |
---|---|---|
bbox | BBox | extent in [west, south, east, north] order |
Returns
BBox a square surrounding bbox
Examples
var bbox = [-20, -20, -15, 0];
var squared = turf.square(bbox);
Installation
$ npm install @turf/square
import { square } from "@turf/square";
const result = square(...);
$ npm install @turf/turf
import * as turf from "@turf/turf";
const result = turf.square(...);