{"version":3,"sources":["../../index.ts"],"sourcesContent":["import {\n FeatureCollection,\n Polygon,\n BBox,\n Feature,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { Units } from \"@turf/helpers\";\nimport { rectangleGrid } from \"@turf/rectangle-grid\";\n\n/**\n * Creates a grid of square polygons with cell length consistent in degrees\n *\n * @function\n * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.\n * @param {number} cellSide length of each cell side.\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] the units of the cellSide value.\n * Supports all valid Turf {@link https://github.com/Turfjs/turf/blob/master/packages/turf-helpers/README_UNITS.md Units}.\n * If you are looking for squares with sides of equal lengths in linear units (e.g. kilometers) this is not the module for you.\n * The cellSide is converted from units provided to degrees internally, so the width and height of resulting polygons will be consistent only in degrees.\n * @param {Feature} [options.mask] if passed a Polygon or MultiPolygon,\n * the grid Points will be created only inside it\n * @param {Object} [options.properties={}] passed to each point of the grid\n * @returns {FeatureCollection} a grid of polygons with equal width and height in degrees.\n * @example\n * var bbox = [-95, 30 ,-85, 40];\n * var cellSide = 50;\n * var options = {units: 'miles'};\n *\n * var squareGrid = turf.squareGrid(bbox, cellSide, options);\n *\n * //addToMap\n * var addToMap = [squareGrid]\n */\n\nfunction squareGrid

(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"],"mappings":";AASA,SAAS,qBAAqB;AA4B9B,SAAS,WACP,MACA,UACA,UAII,CAAC,GAC0B;AAC/B,SAAO,cAAc,MAAM,UAAU,UAAU,OAAO;AACxD;AAGA,IAAO,2BAAQ;","names":[]}