more WrappedGeometry unwrapping fixes
This commit is contained in:
parent
d07361112f
commit
2f958babce
1 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ class EditorViewSet(EditorViewSetMixin, ViewSet):
|
||||||
holes = [unwrap_geom(hole.geometry) for hole in space.holes.all()]
|
holes = [unwrap_geom(hole.geometry) for hole in space.holes.all()]
|
||||||
if holes:
|
if holes:
|
||||||
space_holes_geom = unary_union(holes)
|
space_holes_geom = unary_union(holes)
|
||||||
holes_geom.append(space_holes_geom.intersection(space.geometry))
|
holes_geom.append(space_holes_geom.intersection(unwrap_geom(space.geometry)))
|
||||||
space.geometry = space.geometry.difference(space_holes_geom)
|
space.geometry = space.geometry.difference(space_holes_geom)
|
||||||
|
|
||||||
for building in buildings:
|
for building in buildings:
|
||||||
|
@ -100,7 +100,7 @@ class EditorViewSet(EditorViewSetMixin, ViewSet):
|
||||||
holes_geom = unary_union(holes_geom)
|
holes_geom = unary_union(holes_geom)
|
||||||
holes_geom_prep = prepared.prep(holes_geom)
|
holes_geom_prep = prepared.prep(holes_geom)
|
||||||
for obj in buildings:
|
for obj in buildings:
|
||||||
if holes_geom_prep.intersects(obj.geometry):
|
if holes_geom_prep.intersects(unwrap_geom(obj.geometry)):
|
||||||
obj.geometry = obj.geometry.difference(holes_geom)
|
obj.geometry = obj.geometry.difference(holes_geom)
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue