Skip to content

isMultiPointInPoly variables oneInside is never used #2462

Description

@qugemingzizhemefeijin

turf/packages/turf-boolean-within
/index.ts

The following code:

function isMultiPointInPoly(multiPoint: MultiPoint, polygon: Polygon) {
  var output = true;
  var oneInside = false;
  var isInside = false;
  for (var i = 0; i < multiPoint.coordinates.length; i++) {
    isInside = booleanPointInPolygon(multiPoint.coordinates[i], polygon);
    if (!isInside) {
      output = false;
      break;
    }
    if (!oneInside) {
      // this variables Should be oneInside ???
      isInside = booleanPointInPolygon(multiPoint.coordinates[i], polygon, {
        ignoreBoundary: true,
      });
    }
  }
  return output && isInside;
}

this code variable oneInside Whether it is not used。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions