I'm using GeoDjango (but I guess this is from the geos library). I have a set of polygons that compose a city surface and I want to merge them into a single one.
The code looks like this:
polygons = [zone.poly for zone in self.zone_set.all()] poly = polygons for pol in polygons[1:]: poly = poly.union(pol) self.poly = poly self.save()
The problem with this is I get a TopologyException after the first three mergings, stating there is a self-intersection
What does this mean? Shouldn't overlapping points be merged as a 'union'? Thanks in advance!!