@turf/point-on-feature 7.0.0 → 7.1.0-alpha.7

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,7 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // index.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// index.ts
5
2
  var _explode = require('@turf/explode');
6
3
  var _center = require('@turf/center');
7
4
  var _nearestpoint = require('@turf/nearest-point');
@@ -85,7 +82,6 @@ function pointOnFeature(geojson) {
85
82
  return _helpers.point.call(void 0, _nearestpoint.nearestPoint.call(void 0, cent, vertices).geometry.coordinates);
86
83
  }
87
84
  }
88
- __name(pointOnFeature, "pointOnFeature");
89
85
  function normalize(geojson) {
90
86
  if (geojson.type !== "FeatureCollection") {
91
87
  if (geojson.type !== "Feature") {
@@ -95,14 +91,12 @@ function normalize(geojson) {
95
91
  }
96
92
  return geojson;
97
93
  }
98
- __name(normalize, "normalize");
99
94
  function pointOnSegment(x, y, x1, y1, x2, y2) {
100
95
  const ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
101
96
  const ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
102
97
  const pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));
103
98
  return ab === ap + pb;
104
99
  }
105
- __name(pointOnSegment, "pointOnSegment");
106
100
  var turf_point_on_feature_default = pointOnFeature;
107
101
 
108
102
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";;;;AAEA,SAAS,eAAe;AACxB,SAAS,UAAU,gBAAgB;AACnC,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,mBAAmB,SAAS,aAAa;AA4BlD,SAAS,eAAe,SAAqC;AAE3D,QAAM,KAAK,UAAU,OAA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GACA,GACA,IACA,IACA,IACA,IACA;AACA,QAAM,KAAK,KAAK,MAAM,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,GAAG;AAClE,QAAM,KAAK,KAAK,MAAM,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,IAAI,GAAG;AAC9D,QAAM,KAAK,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,EAAE;AAC9D,SAAO,OAAO,KAAK;AACrB;AAZS;AAeT,IAAO,gCAAQ","sourcesContent":["import type { Feature, Point } from \"geojson\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport { explode } from \"@turf/explode\";\nimport { center as centroid } from \"@turf/center\";\nimport { nearestPoint } from \"@turf/nearest-point\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { featureCollection, feature, point } from \"@turf/helpers\";\n\n/**\n * Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.\n *\n * * Given a {@link Polygon}, the point will be in the area of the polygon\n * * Given a {@link LineString}, the point will be along the string\n * * Given a {@link Point}, the point will the same as the input\n *\n * @name pointOnFeature\n * @param {GeoJSON} geojson any Feature or FeatureCollection\n * @returns {Feature<Point>} a point on the surface of `input`\n * @example\n * var polygon = turf.polygon([[\n * [116, -36],\n * [131, -32],\n * [146, -43],\n * [155, -25],\n * [133, -9],\n * [111, -22],\n * [116, -36]\n * ]]);\n *\n * var pointOnPolygon = turf.pointOnFeature(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, pointOnPolygon];\n */\nfunction pointOnFeature(geojson: AllGeoJSON): Feature<Point> {\n // normalize\n const fc = normalize(geojson);\n\n // get centroid\n const cent = centroid(fc);\n\n // check to see if centroid is on surface\n let onSurface = false;\n let i = 0;\n while (!onSurface && i < fc.features.length) {\n const geom = fc.features[i].geometry;\n let x, y, x1, y1, x2, y2;\n let onLine = false;\n if (geom.type === \"Point\") {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[0] &&\n cent.geometry.coordinates[1] === geom.coordinates[1]\n ) {\n onSurface = true;\n }\n } else if (geom.type === \"MultiPoint\") {\n let onMultiPoint = false;\n let k = 0;\n while (!onMultiPoint && k < geom.coordinates.length) {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[k][0] &&\n cent.geometry.coordinates[1] === geom.coordinates[k][1]\n ) {\n onSurface = true;\n onMultiPoint = true;\n }\n k++;\n }\n } else if (geom.type === \"LineString\") {\n let k = 0;\n while (!onLine && k < geom.coordinates.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = geom.coordinates[k][0];\n y1 = geom.coordinates[k][1];\n x2 = geom.coordinates[k + 1][0];\n y2 = geom.coordinates[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n } else if (geom.type === \"MultiLineString\") {\n let j = 0;\n while (j < geom.coordinates.length) {\n onLine = false;\n let k = 0;\n const line = geom.coordinates[j];\n while (!onLine && k < line.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = line[k][0];\n y1 = line[k][1];\n x2 = line[k + 1][0];\n y2 = line[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n j++;\n }\n } else if (geom.type === \"Polygon\" || geom.type === \"MultiPolygon\") {\n if (booleanPointInPolygon(cent, geom)) {\n onSurface = true;\n }\n }\n i++;\n }\n if (onSurface) {\n return cent;\n } else {\n const vertices = featureCollection<Point>([]);\n for (let f = 0; f < fc.features.length; f++) {\n vertices.features = vertices.features.concat(\n explode(fc.features[f]).features\n );\n }\n // Remove distanceToPoint properties from nearestPoint()\n return point(nearestPoint(cent, vertices).geometry.coordinates);\n }\n}\n\n/**\n * Normalizes any GeoJSON to a FeatureCollection\n *\n * @private\n * @name normalize\n * @param {GeoJSON} geojson Any GeoJSON\n * @returns {FeatureCollection} FeatureCollection\n */\nfunction normalize(geojson: AllGeoJSON) {\n if (geojson.type !== \"FeatureCollection\") {\n if (geojson.type !== \"Feature\") {\n return featureCollection([feature(geojson)]);\n }\n return featureCollection([geojson]);\n }\n return geojson;\n}\n\nfunction pointOnSegment(\n x: number,\n y: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number\n) {\n const ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n const ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n const pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));\n return ab === ap + pb;\n}\n\nexport { pointOnFeature };\nexport default pointOnFeature;\n"]}
1
+ {"version":3,"sources":["../../index.ts"],"names":[],"mappings":";AAEA,SAAS,eAAe;AACxB,SAAS,UAAU,gBAAgB;AACnC,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,mBAAmB,SAAS,aAAa;AA4BlD,SAAS,eAAe,SAAqC;AAE3D,QAAM,KAAK,UAAU,OAAO;AAG5B,QAAM,OAAO,SAAS,EAAE;AAGxB,MAAI,YAAY;AAChB,MAAI,IAAI;AACR,SAAO,CAAC,aAAa,IAAI,GAAG,SAAS,QAAQ;AAC3C,UAAM,OAAO,GAAG,SAAS,CAAC,EAAE;AAC5B,QAAI,GAAG,GAAG,IAAI,IAAI,IAAI;AACtB,QAAI,SAAS;AACb,QAAI,KAAK,SAAS,SAAS;AACzB,UACE,KAAK,SAAS,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,KACnD,KAAK,SAAS,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,GACnD;AACA,oBAAY;AAAA,MACd;AAAA,IACF,WAAW,KAAK,SAAS,cAAc;AACrC,UAAI,eAAe;AACnB,UAAI,IAAI;AACR,aAAO,CAAC,gBAAgB,IAAI,KAAK,YAAY,QAAQ;AACnD,YACE,KAAK,SAAS,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,EAAE,CAAC,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,sBAAsB,MAAM,IAAI,GAAG;AACrC,oBAAY;AAAA,MACd;AAAA,IACF;AACA;AAAA,EACF;AACA,MAAI,WAAW;AACb,WAAO;AAAA,EACT,OAAO;AACL,UAAM,WAAW,kBAAyB,CAAC,CAAC;AAC5C,aAAS,IAAI,GAAG,IAAI,GAAG,SAAS,QAAQ,KAAK;AAC3C,eAAS,WAAW,SAAS,SAAS;AAAA,QACpC,QAAQ,GAAG,SAAS,CAAC,CAAC,EAAE;AAAA,MAC1B;AAAA,IACF;AAEA,WAAO,MAAM,aAAa,MAAM,QAAQ,EAAE,SAAS,WAAW;AAAA,EAChE;AACF;AAUA,SAAS,UAAU,SAAqB;AACtC,MAAI,QAAQ,SAAS,qBAAqB;AACxC,QAAI,QAAQ,SAAS,WAAW;AAC9B,aAAO,kBAAkB,CAAC,QAAQ,OAAO,CAAC,CAAC;AAAA,IAC7C;AACA,WAAO,kBAAkB,CAAC,OAAO,CAAC;AAAA,EACpC;AACA,SAAO;AACT;AAEA,SAAS,eACP,GACA,GACA,IACA,IACA,IACA,IACA;AACA,QAAM,KAAK,KAAK,MAAM,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,GAAG;AAClE,QAAM,KAAK,KAAK,MAAM,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,IAAI,GAAG;AAC9D,QAAM,KAAK,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,EAAE;AAC9D,SAAO,OAAO,KAAK;AACrB;AAGA,IAAO,gCAAQ","sourcesContent":["import type { Feature, Point } from \"geojson\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport { explode } from \"@turf/explode\";\nimport { center as centroid } from \"@turf/center\";\nimport { nearestPoint } from \"@turf/nearest-point\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { featureCollection, feature, point } from \"@turf/helpers\";\n\n/**\n * Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.\n *\n * * Given a {@link Polygon}, the point will be in the area of the polygon\n * * Given a {@link LineString}, the point will be along the string\n * * Given a {@link Point}, the point will the same as the input\n *\n * @name pointOnFeature\n * @param {GeoJSON} geojson any Feature or FeatureCollection\n * @returns {Feature<Point>} a point on the surface of `input`\n * @example\n * var polygon = turf.polygon([[\n * [116, -36],\n * [131, -32],\n * [146, -43],\n * [155, -25],\n * [133, -9],\n * [111, -22],\n * [116, -36]\n * ]]);\n *\n * var pointOnPolygon = turf.pointOnFeature(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, pointOnPolygon];\n */\nfunction pointOnFeature(geojson: AllGeoJSON): Feature<Point> {\n // normalize\n const fc = normalize(geojson);\n\n // get centroid\n const cent = centroid(fc);\n\n // check to see if centroid is on surface\n let onSurface = false;\n let i = 0;\n while (!onSurface && i < fc.features.length) {\n const geom = fc.features[i].geometry;\n let x, y, x1, y1, x2, y2;\n let onLine = false;\n if (geom.type === \"Point\") {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[0] &&\n cent.geometry.coordinates[1] === geom.coordinates[1]\n ) {\n onSurface = true;\n }\n } else if (geom.type === \"MultiPoint\") {\n let onMultiPoint = false;\n let k = 0;\n while (!onMultiPoint && k < geom.coordinates.length) {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[k][0] &&\n cent.geometry.coordinates[1] === geom.coordinates[k][1]\n ) {\n onSurface = true;\n onMultiPoint = true;\n }\n k++;\n }\n } else if (geom.type === \"LineString\") {\n let k = 0;\n while (!onLine && k < geom.coordinates.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = geom.coordinates[k][0];\n y1 = geom.coordinates[k][1];\n x2 = geom.coordinates[k + 1][0];\n y2 = geom.coordinates[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n } else if (geom.type === \"MultiLineString\") {\n let j = 0;\n while (j < geom.coordinates.length) {\n onLine = false;\n let k = 0;\n const line = geom.coordinates[j];\n while (!onLine && k < line.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = line[k][0];\n y1 = line[k][1];\n x2 = line[k + 1][0];\n y2 = line[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n j++;\n }\n } else if (geom.type === \"Polygon\" || geom.type === \"MultiPolygon\") {\n if (booleanPointInPolygon(cent, geom)) {\n onSurface = true;\n }\n }\n i++;\n }\n if (onSurface) {\n return cent;\n } else {\n const vertices = featureCollection<Point>([]);\n for (let f = 0; f < fc.features.length; f++) {\n vertices.features = vertices.features.concat(\n explode(fc.features[f]).features\n );\n }\n // Remove distanceToPoint properties from nearestPoint()\n return point(nearestPoint(cent, vertices).geometry.coordinates);\n }\n}\n\n/**\n * Normalizes any GeoJSON to a FeatureCollection\n *\n * @private\n * @name normalize\n * @param {GeoJSON} geojson Any GeoJSON\n * @returns {FeatureCollection} FeatureCollection\n */\nfunction normalize(geojson: AllGeoJSON) {\n if (geojson.type !== \"FeatureCollection\") {\n if (geojson.type !== \"Feature\") {\n return featureCollection([feature(geojson)]);\n }\n return featureCollection([geojson]);\n }\n return geojson;\n}\n\nfunction pointOnSegment(\n x: number,\n y: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number\n) {\n const ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n const ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n const pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));\n return ab === ap + pb;\n}\n\nexport { pointOnFeature };\nexport default pointOnFeature;\n"]}
package/dist/esm/index.js CHANGED
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // index.ts
5
2
  import { explode } from "@turf/explode";
6
3
  import { center as centroid } from "@turf/center";
@@ -85,7 +82,6 @@ function pointOnFeature(geojson) {
85
82
  return point(nearestPoint(cent, vertices).geometry.coordinates);
86
83
  }
87
84
  }
88
- __name(pointOnFeature, "pointOnFeature");
89
85
  function normalize(geojson) {
90
86
  if (geojson.type !== "FeatureCollection") {
91
87
  if (geojson.type !== "Feature") {
@@ -95,14 +91,12 @@ function normalize(geojson) {
95
91
  }
96
92
  return geojson;
97
93
  }
98
- __name(normalize, "normalize");
99
94
  function pointOnSegment(x, y, x1, y1, x2, y2) {
100
95
  const ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
101
96
  const ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
102
97
  const pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));
103
98
  return ab === ap + pb;
104
99
  }
105
- __name(pointOnSegment, "pointOnSegment");
106
100
  var turf_point_on_feature_default = pointOnFeature;
107
101
  export {
108
102
  turf_point_on_feature_default as default,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import type { Feature, Point } from \"geojson\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport { explode } from \"@turf/explode\";\nimport { center as centroid } from \"@turf/center\";\nimport { nearestPoint } from \"@turf/nearest-point\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { featureCollection, feature, point } from \"@turf/helpers\";\n\n/**\n * Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.\n *\n * * Given a {@link Polygon}, the point will be in the area of the polygon\n * * Given a {@link LineString}, the point will be along the string\n * * Given a {@link Point}, the point will the same as the input\n *\n * @name pointOnFeature\n * @param {GeoJSON} geojson any Feature or FeatureCollection\n * @returns {Feature<Point>} a point on the surface of `input`\n * @example\n * var polygon = turf.polygon([[\n * [116, -36],\n * [131, -32],\n * [146, -43],\n * [155, -25],\n * [133, -9],\n * [111, -22],\n * [116, -36]\n * ]]);\n *\n * var pointOnPolygon = turf.pointOnFeature(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, pointOnPolygon];\n */\nfunction pointOnFeature(geojson: AllGeoJSON): Feature<Point> {\n // normalize\n const fc = normalize(geojson);\n\n // get centroid\n const cent = centroid(fc);\n\n // check to see if centroid is on surface\n let onSurface = false;\n let i = 0;\n while (!onSurface && i < fc.features.length) {\n const geom = fc.features[i].geometry;\n let x, y, x1, y1, x2, y2;\n let onLine = false;\n if (geom.type === \"Point\") {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[0] &&\n cent.geometry.coordinates[1] === geom.coordinates[1]\n ) {\n onSurface = true;\n }\n } else if (geom.type === \"MultiPoint\") {\n let onMultiPoint = false;\n let k = 0;\n while (!onMultiPoint && k < geom.coordinates.length) {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[k][0] &&\n cent.geometry.coordinates[1] === geom.coordinates[k][1]\n ) {\n onSurface = true;\n onMultiPoint = true;\n }\n k++;\n }\n } else if (geom.type === \"LineString\") {\n let k = 0;\n while (!onLine && k < geom.coordinates.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = geom.coordinates[k][0];\n y1 = geom.coordinates[k][1];\n x2 = geom.coordinates[k + 1][0];\n y2 = geom.coordinates[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n } else if (geom.type === \"MultiLineString\") {\n let j = 0;\n while (j < geom.coordinates.length) {\n onLine = false;\n let k = 0;\n const line = geom.coordinates[j];\n while (!onLine && k < line.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = line[k][0];\n y1 = line[k][1];\n x2 = line[k + 1][0];\n y2 = line[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n j++;\n }\n } else if (geom.type === \"Polygon\" || geom.type === \"MultiPolygon\") {\n if (booleanPointInPolygon(cent, geom)) {\n onSurface = true;\n }\n }\n i++;\n }\n if (onSurface) {\n return cent;\n } else {\n const vertices = featureCollection<Point>([]);\n for (let f = 0; f < fc.features.length; f++) {\n vertices.features = vertices.features.concat(\n explode(fc.features[f]).features\n );\n }\n // Remove distanceToPoint properties from nearestPoint()\n return point(nearestPoint(cent, vertices).geometry.coordinates);\n }\n}\n\n/**\n * Normalizes any GeoJSON to a FeatureCollection\n *\n * @private\n * @name normalize\n * @param {GeoJSON} geojson Any GeoJSON\n * @returns {FeatureCollection} FeatureCollection\n */\nfunction normalize(geojson: AllGeoJSON) {\n if (geojson.type !== \"FeatureCollection\") {\n if (geojson.type !== \"Feature\") {\n return featureCollection([feature(geojson)]);\n }\n return featureCollection([geojson]);\n }\n return geojson;\n}\n\nfunction pointOnSegment(\n x: number,\n y: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number\n) {\n const ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n const ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n const pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));\n return ab === ap + pb;\n}\n\nexport { pointOnFeature };\nexport default pointOnFeature;\n"],"mappings":";;;;AAEA,SAAS,eAAe;AACxB,SAAS,UAAU,gBAAgB;AACnC,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,mBAAmB,SAAS,aAAa;AA4BlD,SAAS,eAAe,SAAqC;AAE3D,QAAM,KAAK,UAAU,OAAO;AAG5B,QAAM,OAAO,SAAS,EAAE;AAGxB,MAAI,YAAY;AAChB,MAAI,IAAI;AACR,SAAO,CAAC,aAAa,IAAI,GAAG,SAAS,QAAQ;AAC3C,UAAM,OAAO,GAAG,SAAS,CAAC,EAAE;AAC5B,QAAI,GAAG,GAAG,IAAI,IAAI,IAAI;AACtB,QAAI,SAAS;AACb,QAAI,KAAK,SAAS,SAAS;AACzB,UACE,KAAK,SAAS,YAAY,CAAC,MAAM,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;AAZS;AAeT,IAAO,gCAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import type { Feature, Point } from \"geojson\";\nimport type { AllGeoJSON } from \"@turf/helpers\";\nimport { explode } from \"@turf/explode\";\nimport { center as centroid } from \"@turf/center\";\nimport { nearestPoint } from \"@turf/nearest-point\";\nimport { booleanPointInPolygon } from \"@turf/boolean-point-in-polygon\";\nimport { featureCollection, feature, point } from \"@turf/helpers\";\n\n/**\n * Takes a Feature or FeatureCollection and returns a {@link Point} guaranteed to be on the surface of the feature.\n *\n * * Given a {@link Polygon}, the point will be in the area of the polygon\n * * Given a {@link LineString}, the point will be along the string\n * * Given a {@link Point}, the point will the same as the input\n *\n * @name pointOnFeature\n * @param {GeoJSON} geojson any Feature or FeatureCollection\n * @returns {Feature<Point>} a point on the surface of `input`\n * @example\n * var polygon = turf.polygon([[\n * [116, -36],\n * [131, -32],\n * [146, -43],\n * [155, -25],\n * [133, -9],\n * [111, -22],\n * [116, -36]\n * ]]);\n *\n * var pointOnPolygon = turf.pointOnFeature(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, pointOnPolygon];\n */\nfunction pointOnFeature(geojson: AllGeoJSON): Feature<Point> {\n // normalize\n const fc = normalize(geojson);\n\n // get centroid\n const cent = centroid(fc);\n\n // check to see if centroid is on surface\n let onSurface = false;\n let i = 0;\n while (!onSurface && i < fc.features.length) {\n const geom = fc.features[i].geometry;\n let x, y, x1, y1, x2, y2;\n let onLine = false;\n if (geom.type === \"Point\") {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[0] &&\n cent.geometry.coordinates[1] === geom.coordinates[1]\n ) {\n onSurface = true;\n }\n } else if (geom.type === \"MultiPoint\") {\n let onMultiPoint = false;\n let k = 0;\n while (!onMultiPoint && k < geom.coordinates.length) {\n if (\n cent.geometry.coordinates[0] === geom.coordinates[k][0] &&\n cent.geometry.coordinates[1] === geom.coordinates[k][1]\n ) {\n onSurface = true;\n onMultiPoint = true;\n }\n k++;\n }\n } else if (geom.type === \"LineString\") {\n let k = 0;\n while (!onLine && k < geom.coordinates.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = geom.coordinates[k][0];\n y1 = geom.coordinates[k][1];\n x2 = geom.coordinates[k + 1][0];\n y2 = geom.coordinates[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n } else if (geom.type === \"MultiLineString\") {\n let j = 0;\n while (j < geom.coordinates.length) {\n onLine = false;\n let k = 0;\n const line = geom.coordinates[j];\n while (!onLine && k < line.length - 1) {\n x = cent.geometry.coordinates[0];\n y = cent.geometry.coordinates[1];\n x1 = line[k][0];\n y1 = line[k][1];\n x2 = line[k + 1][0];\n y2 = line[k + 1][1];\n if (pointOnSegment(x, y, x1, y1, x2, y2)) {\n onLine = true;\n onSurface = true;\n }\n k++;\n }\n j++;\n }\n } else if (geom.type === \"Polygon\" || geom.type === \"MultiPolygon\") {\n if (booleanPointInPolygon(cent, geom)) {\n onSurface = true;\n }\n }\n i++;\n }\n if (onSurface) {\n return cent;\n } else {\n const vertices = featureCollection<Point>([]);\n for (let f = 0; f < fc.features.length; f++) {\n vertices.features = vertices.features.concat(\n explode(fc.features[f]).features\n );\n }\n // Remove distanceToPoint properties from nearestPoint()\n return point(nearestPoint(cent, vertices).geometry.coordinates);\n }\n}\n\n/**\n * Normalizes any GeoJSON to a FeatureCollection\n *\n * @private\n * @name normalize\n * @param {GeoJSON} geojson Any GeoJSON\n * @returns {FeatureCollection} FeatureCollection\n */\nfunction normalize(geojson: AllGeoJSON) {\n if (geojson.type !== \"FeatureCollection\") {\n if (geojson.type !== \"Feature\") {\n return featureCollection([feature(geojson)]);\n }\n return featureCollection([geojson]);\n }\n return geojson;\n}\n\nfunction pointOnSegment(\n x: number,\n y: number,\n x1: number,\n y1: number,\n x2: number,\n y2: number\n) {\n const ab = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n const ap = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));\n const pb = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));\n return ab === ap + pb;\n}\n\nexport { pointOnFeature };\nexport default pointOnFeature;\n"],"mappings":";AAEA,SAAS,eAAe;AACxB,SAAS,UAAU,gBAAgB;AACnC,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,mBAAmB,SAAS,aAAa;AA4BlD,SAAS,eAAe,SAAqC;AAE3D,QAAM,KAAK,UAAU,OAAO;AAG5B,QAAM,OAAO,SAAS,EAAE;AAGxB,MAAI,YAAY;AAChB,MAAI,IAAI;AACR,SAAO,CAAC,aAAa,IAAI,GAAG,SAAS,QAAQ;AAC3C,UAAM,OAAO,GAAG,SAAS,CAAC,EAAE;AAC5B,QAAI,GAAG,GAAG,IAAI,IAAI,IAAI;AACtB,QAAI,SAAS;AACb,QAAI,KAAK,SAAS,SAAS;AACzB,UACE,KAAK,SAAS,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,KACnD,KAAK,SAAS,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,GACnD;AACA,oBAAY;AAAA,MACd;AAAA,IACF,WAAW,KAAK,SAAS,cAAc;AACrC,UAAI,eAAe;AACnB,UAAI,IAAI;AACR,aAAO,CAAC,gBAAgB,IAAI,KAAK,YAAY,QAAQ;AACnD,YACE,KAAK,SAAS,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,EAAE,CAAC,KACtD,KAAK,SAAS,YAAY,CAAC,MAAM,KAAK,YAAY,CAAC,EAAE,CAAC,GACtD;AACA,sBAAY;AACZ,yBAAe;AAAA,QACjB;AACA;AAAA,MACF;AAAA,IACF,WAAW,KAAK,SAAS,cAAc;AACrC,UAAI,IAAI;AACR,aAAO,CAAC,UAAU,IAAI,KAAK,YAAY,SAAS,GAAG;AACjD,YAAI,KAAK,SAAS,YAAY,CAAC;AAC/B,YAAI,KAAK,SAAS,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AAE;AAAA,MAC1B;AAAA,IACF;AAEA,WAAO,MAAM,aAAa,MAAM,QAAQ,EAAE,SAAS,WAAW;AAAA,EAChE;AACF;AAUA,SAAS,UAAU,SAAqB;AACtC,MAAI,QAAQ,SAAS,qBAAqB;AACxC,QAAI,QAAQ,SAAS,WAAW;AAC9B,aAAO,kBAAkB,CAAC,QAAQ,OAAO,CAAC,CAAC;AAAA,IAC7C;AACA,WAAO,kBAAkB,CAAC,OAAO,CAAC;AAAA,EACpC;AACA,SAAO;AACT;AAEA,SAAS,eACP,GACA,GACA,IACA,IACA,IACA,IACA;AACA,QAAM,KAAK,KAAK,MAAM,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,GAAG;AAClE,QAAM,KAAK,KAAK,MAAM,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,IAAI,GAAG;AAC9D,QAAM,KAAK,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,EAAE;AAC9D,SAAO,OAAO,KAAK;AACrB;AAGA,IAAO,gCAAQ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/point-on-feature",
3
- "version": "7.0.0",
3
+ "version": "7.1.0-alpha.7+0ce6ecca0",
4
4
  "description": "turf point-on-feature module",
5
5
  "author": "Turf Authors",
6
6
  "license": "MIT",
@@ -53,8 +53,8 @@
53
53
  "test:tape": "tsx test.ts"
54
54
  },
55
55
  "devDependencies": {
56
- "@turf/meta": "^7.0.0",
57
- "@turf/truncate": "^7.0.0",
56
+ "@turf/meta": "^7.1.0-alpha.7+0ce6ecca0",
57
+ "@turf/truncate": "^7.1.0-alpha.7+0ce6ecca0",
58
58
  "@types/benchmark": "^2.1.5",
59
59
  "@types/tape": "^4.2.32",
60
60
  "benchmark": "^2.1.4",
@@ -66,12 +66,12 @@
66
66
  "write-json-file": "^5.0.0"
67
67
  },
68
68
  "dependencies": {
69
- "@turf/boolean-point-in-polygon": "^7.0.0",
70
- "@turf/center": "^7.0.0",
71
- "@turf/explode": "^7.0.0",
72
- "@turf/helpers": "^7.0.0",
73
- "@turf/nearest-point": "^7.0.0",
69
+ "@turf/boolean-point-in-polygon": "^7.1.0-alpha.7+0ce6ecca0",
70
+ "@turf/center": "^7.1.0-alpha.7+0ce6ecca0",
71
+ "@turf/explode": "^7.1.0-alpha.7+0ce6ecca0",
72
+ "@turf/helpers": "^7.1.0-alpha.7+0ce6ecca0",
73
+ "@turf/nearest-point": "^7.1.0-alpha.7+0ce6ecca0",
74
74
  "tslib": "^2.6.2"
75
75
  },
76
- "gitHead": "3d3a7917025fbabe191dbddbc89754b86f9c7739"
76
+ "gitHead": "0ce6ecca05829690270fec6d6bed2003495fe0ea"
77
77
  }