gis-tools-ts - v0.6.0
    Preparing search index...

    Function pointInPolygons

    • A robust method to see if a point is in a collection of polygons or not. Be sure the point and polygon are in the same projection space.

      Type Parameters

      • M = Record<string, unknown>
      • D extends Properties = Properties
      • P extends Properties = Properties

      Parameters

      • point: VectorPoint

        the point to check

      • polygons:
            | VectorMultiPolygon<D>
            | VectorMultiPolygonGeometry<D>
            | VectorFeature<M, D, P, VectorMultiPolygonGeometry<D>>
            | S2Feature<M, D, P, VectorMultiPolygonGeometry<D>>

        the collection of polygons

      • ignoreBoundary: boolean = false

        if true, ignore when the point is on the boundary

      Returns boolean

      • true if the point is in the polygon