0

I want to simplify adjacent polygons (GADM zones level 1) with Python while maintaining shared borders.

The general problem is well explained at Simplifying Polygonal Coverages with JTS. The best external tool I found is https://mapshaper.org/

There are already some Q&As about this problem in this site like Generalizing polygon file while maintaining topology in QGIS. Unfortunately, I have not yet found a solution which I can easily use in Python.

Do you have tips for a function of a specific package?

I also thought about using GRASS in Python. I think v.generalize is what I am looking for.

1
  • 1
    I've just tried the topojson solution in the duplicate question and it works nicely on a test set of UK subregions, and the adjacency matrix is preserved. Commented Jul 1, 2024 at 21:02

1 Answer 1

-1

I just found this Q&A which is helpful (using topojson): Geopandas simplify results in gaps between polygons

And I found out that the JTS algorithm is supposed to be downstreamed to shapely (a Python package). Unfortunately, I don’t know when this will be implemented but it is mentioned at the end of the blogpost: http://lin-ear-th-inking.blogspot.com/2023/03/simplifying-polygonal-coverages-with-jts.html?m=1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.