Count number of overlapping polygons with Julia?

Hi all, I have a series of partially overlapping polygons in a single shapefile, and I need to create a new shapefile that has the number of overlapping polygons in each intersection. e.g. this.

There is a way to do it in R (sf::st_intersection) but I found that to be incredibly buggy, and it flat out did not work for the shapefile of interest. I’ve googled around for a way to do this with other GIS software, such as QGIS, PostGIS, and GDAL/OGR, but there seems to be no straightforward and efficient way to do what I need on any of those platforms (and this may also just be because I am illiterate in SQLite)

I’m hoping the the geometry packages in Julia might offer a fast and relatively straightforward way to do this – maybe LibGEOS.jl? Any help and/or code would be greatly appreciated. Thanks!

The issue with R seems to actually be rooted in GEOS. I’m getting errors about non-noded intersections

hey, i have exactly the same use case. what did you end up doing here? thanks