import { Position } from 'geojson' ; import { BBox } from './types.js' ; param bbox returns export function bboxToPolygon ( bbox ) { return [ [ [ bbox [ 0 ] , bbox [ 1 ] ] , [ bbox [ 2 ] , bbox [ 1 ] ] , [ bbox [ 2 ] , bbox [ 3 ] ] , [ bbox [ 0 ] , bbox [ 3 ] ] , [ bbox [ 0 ] , bbox [ 1 ] ] , ] , ] ; } param a param b export function bboxContains ( a , b ) { return a [ 0 ] <= b [ 0 ] && a [ 2 ] >= b [ 2 ] && a [ 1 ] <= b [ 1 ] && a [ 3 ] >= b [ 3 ] ; }