geopandas.GeoSeries.has_z#

property GeoSeries.has_z[来源]#

返回一个 Series,其 dtype('bool') 类型的值为 True,用于具有 z 组件的特征。

笔记

GeoPandas中的每个操作都是平面的,即不考虑潜在的第三维度。

示例

>>> from shapely.geometry import Point
>>> s = geopandas.GeoSeries(
...     [
...         Point(0, 1),
...         Point(0, 1, 2),
...     ]
... )
>>> s
0        POINT (0 1)
1    POINT Z (0 1 2)
dtype: geometry
>>> s.has_z
0    False
1     True
dtype: bool