@turf/square-grid 7.1.0-alpha.70 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AASA,SAAS,qBAAqB;AA4B9B,SAAS,WACP,MACA,UACA,UAII,CAAC,GAC0B;AAC/B,SAAO,cAAc,MAAM,UAAU,UAAU,OAAO;AACxD;AAGA,IAAO,2BAAQ","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 * @name squareGrid\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<Polygon|MultiPolygon>} [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<Polygon>} 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<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-square-grid/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACSA,qDAA8B;AA4B9B,SAAS,UAAA,CACP,IAAA,EACA,QAAA,EACA,QAAA,EAII,CAAC,CAAA,EAC0B;AAC/B,EAAA,OAAO,0CAAA,IAAc,EAAM,QAAA,EAAU,QAAA,EAAU,OAAO,CAAA;AACxD;AAGA,IAAO,yBAAA,EAAQ,UAAA;AD5Cf;AACE;AACA;AACF,4EAAC","file":"/home/runner/work/turf/turf/packages/turf-square-grid/dist/cjs/index.cjs","sourcesContent":[null,"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<Polygon|MultiPolygon>} [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<Polygon>} 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<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\n return rectangleGrid(bbox, cellSide, cellSide, options);\n}\n\nexport { squareGrid };\nexport default squareGrid;\n"]}
@@ -4,7 +4,7 @@ import { Units } from '@turf/helpers';
4
4
  /**
5
5
  * Creates a grid of square polygons with cell length consistent in degrees
6
6
  *
7
- * @name squareGrid
7
+ * @function
8
8
  * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.
9
9
  * @param {number} cellSide length of each cell side.
10
10
  * @param {Object} [options={}] Optional parameters
@@ -4,7 +4,7 @@ import { Units } from '@turf/helpers';
4
4
  /**
5
5
  * Creates a grid of square polygons with cell length consistent in degrees
6
6
  *
7
- * @name squareGrid
7
+ * @function
8
8
  * @param {BBox} bbox extent of grid in [minX, minY, maxX, maxY] order. If the grid does not fill the bbox perfectly, it is centered.
9
9
  * @param {number} cellSide length of each cell side.
10
10
  * @param {Object} [options={}] Optional parameters
@@ -1 +1 @@
1
- {"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 * @name squareGrid\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<Polygon|MultiPolygon>} [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<Polygon>} 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<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\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":[]}
1
+ {"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<Polygon|MultiPolygon>} [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<Polygon>} 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<P extends GeoJsonProperties = GeoJsonProperties>(\n bbox: BBox,\n cellSide: number,\n options: {\n units?: Units;\n properties?: P;\n mask?: Feature<Polygon | MultiPolygon> | Polygon | MultiPolygon;\n } = {}\n): FeatureCollection<Polygon, P> {\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":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/square-grid",
3
- "version": "7.1.0-alpha.70+948cdafaf",
3
+ "version": "7.2.0",
4
4
  "description": "turf square-grid module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -52,23 +52,23 @@
52
52
  "test:tape": "tsx test.ts"
53
53
  },
54
54
  "devDependencies": {
55
- "@turf/bbox-polygon": "^7.1.0-alpha.70+948cdafaf",
56
- "@turf/truncate": "^7.1.0-alpha.70+948cdafaf",
55
+ "@turf/bbox-polygon": "^7.2.0",
56
+ "@turf/truncate": "^7.2.0",
57
57
  "@types/benchmark": "^2.1.5",
58
- "@types/tape": "^4.2.32",
58
+ "@types/tape": "^4.13.4",
59
59
  "benchmark": "^2.1.4",
60
60
  "npm-run-all": "^4.1.5",
61
- "tape": "^5.7.2",
62
- "tsup": "^8.0.1",
63
- "tsx": "^4.6.2",
64
- "typescript": "^5.2.2",
61
+ "tape": "^5.9.0",
62
+ "tsup": "^8.3.5",
63
+ "tsx": "^4.19.2",
64
+ "typescript": "^5.5.4",
65
65
  "write-json-file": "^5.0.0"
66
66
  },
67
67
  "dependencies": {
68
- "@turf/helpers": "^7.1.0-alpha.70+948cdafaf",
69
- "@turf/rectangle-grid": "^7.1.0-alpha.70+948cdafaf",
68
+ "@turf/helpers": "^7.2.0",
69
+ "@turf/rectangle-grid": "^7.2.0",
70
70
  "@types/geojson": "^7946.0.10",
71
- "tslib": "^2.6.2"
71
+ "tslib": "^2.8.1"
72
72
  },
73
- "gitHead": "948cdafaf70606d2e27fcc79973fa48ee1182067"
73
+ "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
74
74
  }