turf-squaredeprecated

turf square module

Usage no npm install needed!

<script type="module">
  import turfSquare from 'https://cdn.skypack.dev/turf-square';
</script>

README

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

parameter type description
bbox Array. a bounding box

Example

var bbox = [-20,-20,-15,0];
var squared = turf.square(bbox);
var features = turf.featurecollection([
  turf.bboxPolygon(bbox),
  turf.bboxPolygon(squared)]);

//=features

Installation

Requires nodejs.

$ npm install turf-square

Tests

$ npm test