shapely.empty#
- empty(shape, geom_type=None, order='C')#
Create a geometry array prefilled with None or with empty geometries.
- Parameters:
- shapeint or tuple of int
Shape of the empty array, e.g.,
(2, 3)
or2
.- geom_typeshapely.GeometryType, optional
The desired geometry type in case the array should be prefilled with empty geometries. Default
None
.- order{‘C’, ‘F’}, optional, default: ‘C’
Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.
Examples
>>> empty((2, 3)).tolist() [[None, None, None], [None, None, None]] >>> empty(2, geom_type=GeometryType.POINT).tolist() [<POINT EMPTY>, <POINT EMPTY>]