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

    Function dekinkPolygon

    • Given a polygon, if the polygon is kinked, dekink it

      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

      • polygon:
            | VectorPolygon<D>
            | VectorPolygonGeometry<D>
            | VectorFeatures<M, D, P, VectorPolygonGeometry<D>>

        the polygon as either a VectorFeature, VectorPolygonGeometry, or raw VectorPolygon

      Returns VectorMultiPolygonGeometry<D> | undefined

      • the dekinked polygon