Commit 27735eee authored by Kris Vanneste's avatar Kris Vanneste
Browse files

Supported multi-polygon buffers in create_buffer method of MultiData.

git-svn-id: 40b490c5-b4d9-47cb-8714-9bef99b524d5
parent ffdc3a57
......@@ -609,7 +609,7 @@ class MultiData(BasemapData):
instance of :class:`PolygonData` or :class:`MultiPolygonData`
from .polygon import PolygonData
from .polygon import (PolygonData, MultiPolygonData)
buffers = []
for single_data in self:
......@@ -621,7 +621,10 @@ class MultiData(BasemapData):
for buf in buffers[1:]:
poly = poly.Union(buf)
return PolygonData.from_ogr(poly)
if poly.GetGeometryName() in ('POLYGON', 'LINESTRING'):
return PolygonData.from_ogr(poly)
return MultiPolygonData.from_ogr(poly)
def get_region(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment