geopandas.GeoSeries.has_z#

property GeoSeries.has_z#

返回一个 Seriesdtype('bool') 有价值的 True 用于具有z分量的要素。

注意事项

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

示例

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