Atlaslog
Atlaslog / Turf.js / API / bboxPolygon
Turf.js · API reference

bboxPolygon

Quick answer

Takes a bbox and returns an equivalent polygon.

Last verified 2026-11-03 · Turf.js 7.x · Cite this page
Runnable examplesChinese noteAll API topics

Description​

Takes a bbox and returns an equivalent polygon.

Parameters​

NameTypeDescription
bboxBBoxextent in [minX, minY, maxX, maxY] order
options?ObjectOptional parameters (default {})
options.properties?GeoJsonPropertiesTranslate properties to Polygon (default {})
options.id?string | numberTranslate Id to Polygon (default {})

Returns​

Feature<Polygon> a Polygon representation of the bounding box

Examples​

var bbox = [0, 0, 10, 10];

var poly = turf.bboxPolygon(bbox);

Installation​

$ npm install @turf/bbox-polygon

import { bboxPolygon } from "@turf/bbox-polygon";
const result = bboxPolygon(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.bboxPolygon(...);
TutorialsAPI index
English reference text adapted from the official Turf.js documentation, © Turf.js contributors, licensed under MIT.
Original page: https://turfjs.org/docs/api/bboxPolygon · Chinese note: /turf/api/bbox-polygon.html
Cite this page

Atlaslog (2026). bboxPolygon. https://www.jingweizhi.com/en/turf/api/bbox-polygon.html (accessed 2026-11-03).