When indexing a GeometryArray, the buffer_values (and flat_values) of the returned Geometry object does not have the same dtype as the respective array:
In [1]: from spatialpandas.geometry import LineArray
In [2]: line_array = LineArray([
...: [1, 2, 3, 4, 5, 6],
...: [7, 8, 9, 10],
...: [11, 12, 13, 14, 15, 16],
...: ], dtype="i2")
In [3]: line_array.buffer_values.dtype
Out[3]: dtype('int16')
In [4]: line_array[1].buffer_values.dtype
Out[4]: dtype('int64')
In [5]: line_array[1].flat_values.dtype
Out[5]: dtype('int64')
When indexing a
GeometryArray
, thebuffer_values
(andflat_values
) of the returnedGeometry
object does not have the samedtype
as the respective array: