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

    Function dekinkPolygons

    • Given a collection of polygons, if any of the polygons are kinked, dekink them

      NOTE: This algorithm assumes the ring order is correct. Outer rings must be counter-clockwise and inner rings must be clockwise

      Type Parameters

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

      Parameters

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

        the polygons are from either a VectorFeature, VectorPolygonGeometry, or raw VectorPolygon

      Returns VectorMultiPolygonGeometry<D> | undefined

      • the dekinked polygons