diff --git a/geopandas/_block.py b/geopandas/_block.py index 4055f80a7a..178938ed62 100644 --- a/geopandas/_block.py +++ b/geopandas/_block.py @@ -6,14 +6,15 @@ from pandas.core.common import is_null_slice from shapely.geometry.base import geom_factory, BaseGeometry -from .vectorized import GeometryArray, to_shapely +from .vectorized import GeometryArray, to_shapely, concat class GeometryBlock(NonConsolidatableMixIn, Block): - """ implement a geometry block with uint pointers to C objects - as underlying data""" + """ Pandas Geometry block with pointers to C GEOS objects """ __slots__ = () + _concatenator = concat + @property def _holder(self): return GeometryArray diff --git a/geopandas/vectorized.pyx b/geopandas/vectorized.pyx index 29bf628e01..332716e4d9 100644 --- a/geopandas/vectorized.pyx +++ b/geopandas/vectorized.pyx @@ -1566,7 +1566,9 @@ cpdef cysjoin(np.ndarray[np.uintp_t, ndim=1, cast=True] left, return left_out, right_out -def concat(L): +def concat(L, axis=0): + if axis != 0: + raise NotImplementedError("Can only concatenate geometries along axis=0") L = list(L) x = np.concatenate([ga.data for ga in L]) return GeometryArray(x, base=set(L))