Skip to content

Commit

Permalink
Update wkt.py
Browse files Browse the repository at this point in the history
add comment for buffer
  • Loading branch information
eveleighoj authored Nov 27, 2023
1 parent 14e6a92 commit 343452a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions digital_land/datatype/wkt.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ def normalise_geometry(geometry, simplification=0.000005):
# ensure geometry is a MultiPolygon
geometry = make_multipolygon(geometry)

# uses a buffer to combine overlapping polyongs inside the multipolygon
# this is very common when simplifying a geometry collection as it's
# usually why it's a geometry collection not a multipolygon
# ToDO should this be in the make_multipolygon function? Should it record an error?
if geometry:
if not geometry.is_valid:
geometry = geometry.buffer(0)
Expand Down

0 comments on commit 343452a

Please sign in to comment.