# Splitting polygons into narrow and wide parts

**URL:** <https://discourse.julialang.org/t/splitting-polygons-into-narrow-and-wide-parts/84307>\
**Category:** Geo\
**Created:** [July 16, 2022, 7:52am UTC](https://discourse.julialang.org/t/splitting-polygons-into-narrow-and-wide-parts/84307 "2022-07-16T07:52:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Post date:** [July 16, 2022, 7:52am UTC](https://discourse.julialang.org/t/splitting-polygons-into-narrow-and-wide-parts/84307/1 "2022-07-16T07:52:57Z")

</div>

Hey everyone,

I’m interested in a general polygon splitting algorithm that is able to identify very narrow regions and can split up narrow from wide regions.  
I found this via google:

> **[Split Narrow Polygons (Production Mapping)—ArcMap | Documentation](https://desktop.arcgis.com/en/arcmap/latest/tools/production-mapping-toolbox/splitnarrowpolygons.htm)**
>
> ArcGIS geoprocessing tool that identifies areas in polygon features that are narrower than a defined width.

and was wondering whether this is something often used in geospatial data analysis.

Is this an algorithm that exists in the Julia ecosystem or does anyone know a paper that describes an algorithm like this? Any kind of ideas for this problem are appreciated also when they are outside the box 🙂

Thanks in advance and wish you all a wonderful weekend!

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [July 16, 2022, 10:20pm UTC](https://discourse.julialang.org/t/splitting-polygons-into-narrow-and-wide-parts/84307/2 "2022-07-16T22:20:06Z")

</div>

Do you need this for something (what?) or is it simple curiosity?  
If I had to do it I would try something like:

1. calculate the angle between the polygon vertices
2. “cast” rays from those vertices inside a cone (to try to better find the perpendicular to each segment).
3. compute the intersection of those _rays_ with the other side of the polygon.
4. pick the shortest distance and use that a threshold to the decision.

---

<div class="post-metadata">

**Author:** ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Post date:** [July 16, 2022, 10:30pm UTC](https://discourse.julialang.org/t/splitting-polygons-into-narrow-and-wide-parts/84307/3 "2022-07-16T22:30:55Z")

</div>

I’m interested in the application of 3d printing where these narrow areas can’t be filled with infill. I was thinking about some approach of computing the skeleton of the polygon.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [July 16, 2022, 10:59pm UTC](https://discourse.julialang.org/t/splitting-polygons-into-narrow-and-wide-parts/84307/4 "2022-07-16T22:59:59Z")

</div>

Yep, thought on skeleton too but at the end it will be the same. Need to compute distances between the skeleton and the and the polygon boundaries.
