import { FeatureCollection, Polygon, BBox, Units, Feature, MultiPolygon, Properties } from "@turf/helpers"; /** * Creates a square grid from a bounding box. * * @name squareGrid * @param {Array} bbox extent in [minX, minY, maxX, maxY] order * @param {number} cellSide of each cell, in units * @param {Object} [options={}] Optional parameters * @param {string} [options.units='kilometers'] used in calculating cellSide, can be degrees, * radians, miles, or kilometers * @param {Feature} [options.mask] if passed a Polygon or MultiPolygon, * the grid Points will be created only inside it * @param {Object} [options.properties={}] passed to each point of the grid * @returns {FeatureCollection} grid a grid of polygons * @example * var bbox = [-95, 30 ,-85, 40]; * var cellSide = 50; * var options = {units: 'miles'}; * * var squareGrid = turf.squareGrid(bbox, cellSide, options); * * //addToMap * var addToMap = [squareGrid] */ export default function squareGrid

(bbox: BBox, cellSide: number, options?: { units?: Units; properties?: P; mask?: Feature | Polygon | MultiPolygon; }): FeatureCollection;