Skip to content

Commit

Permalink
fix union_cascaded not returning the whole geometry in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lat1le committed Jan 10, 2017
1 parent b96cd51 commit 1b169c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datacube/utils/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,4 @@ def union_cascaded(geoms):

geom.AddGeometry(g._geom) # pylint: disable=protected-access
geom.UnionCascaded()
return _make_geom_from_ogr(geom.GetGeometryRef(0).Clone() if geom.GetGeometryCount() else geom, crs)
return _make_geom_from_ogr(geom.GetGeometryRef(0).Clone() if geom.GetGeometryCount() == 1 else geom, crs)

0 comments on commit 1b169c2

Please sign in to comment.