bbox-fns
Version:
Light-weight JavaScript Bounding Box Utility Functions
16 lines (14 loc) • 352 B
JavaScript
// convert bbox in [xmin, ymin, xmax, ymax] format to a GeoJSON-like Polygon
function polygon([x0, y0, x1, y1]) {
return [
[
[ ], // top-left
[ ], // bottom-left
[ ], // bottom-right
[ ], // top-right
[ ] // top-left
]
];
}
module.exports = polygon;
module.exports.default = polygon;