make sure clipped geometries are DestroyedLayer
parent
9d02c24ea0
commit
63cf97eb01
|
@ -379,6 +379,7 @@ func mergeGeometries(g *geos.Geos, geoms []*geos.Geom, geomType string) []*geos.
|
||||||
if polygon == nil {
|
if polygon == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
g.DestroyLater(polygon)
|
||||||
return []*geos.Geom{polygon}
|
return []*geos.Geom{polygon}
|
||||||
} else if strings.HasSuffix(geomType, "LineString") {
|
} else if strings.HasSuffix(geomType, "LineString") {
|
||||||
linestrings := flattenLineStrings(g, geoms)
|
linestrings := flattenLineStrings(g, geoms)
|
||||||
|
@ -387,9 +388,15 @@ func mergeGeometries(g *geos.Geos, geoms []*geos.Geom, geomType string) []*geos.
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
union := g.LineMerge(linestrings)
|
union := g.LineMerge(linestrings)
|
||||||
|
for _, l := range union {
|
||||||
|
g.DestroyLater(l)
|
||||||
|
}
|
||||||
return union
|
return union
|
||||||
} else if geomType == "Point" {
|
} else if geomType == "Point" {
|
||||||
if len(geoms) >= 1 {
|
if len(geoms) >= 1 {
|
||||||
|
for _, p := range geoms {
|
||||||
|
g.DestroyLater(p)
|
||||||
|
}
|
||||||
return geoms[0:1]
|
return geoms[0:1]
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue