Skip to content

Commit a4c15c6

Browse files
committed
Add _concatenator method to GeometryBlock
Following on pandas-dev/pandas#17728
1 parent d1a566b commit a4c15c6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

geopandas/_block.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010

1111

1212
class GeometryBlock(NonConsolidatableMixIn, Block):
13-
""" implement a geometry block with uint pointers to C objects
14-
as underlying data"""
13+
""" Pandas Geometry block with pointers to C GEOS objects """
1514
__slots__ = ()
1615

16+
_concatenator = concat
17+
1718
@property
1819
def _holder(self):
1920
return GeometryArray

geopandas/vectorized.pyx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,9 @@ cpdef cysjoin(np.ndarray[np.uintp_t, ndim=1, cast=True] left,
15661566
return left_out, right_out
15671567

15681568

1569-
def concat(L):
1569+
def concat(L, axis=0):
1570+
if axis != 0:
1571+
raise NotImplementedError("Can only concatenate geometries along axis=0")
15701572
L = list(L)
15711573
x = np.concatenate([ga.data for ga in L])
15721574
return GeometryArray(x, base=set(L))

0 commit comments

Comments
 (0)