geopandas.GeoSeries.geom_equals_exact#
- GeoSeries.geom_equals_exact(other, tolerance, align=True)#
对于相等对齐的所有几何图形,返回True 其他 到给定的容忍度,否则为假。
该操作以1对1的行方式工作:
- 参数
- otherGeoSeries或几何对象
要比较的GeoSeries(元素级)或几何对象。
- tolerance浮动
测试近似相等时使用的小数位精度。
- align布尔值(默认为True)
如果为True,则根据其索引自动对齐GeoSeries。如果为False,则保留元素的顺序。
- 退货
- 系列(布尔图)
注意事项
此方法以行方式工作。它不会检查某个GeoSeries的元素是否等于 any 另一个元素的元素。
示例
>>> from shapely.geometry import Point >>> s = geopandas.GeoSeries( ... [ ... Point(0, 1.1), ... Point(0, 1.0), ... Point(0, 1.2), ... ] ... )
>>> s 0 POINT (0.00000 1.10000) 1 POINT (0.00000 1.00000) 2 POINT (0.00000 1.20000) dtype: geometry
>>> s.geom_equals_exact(Point(0, 1), tolerance=0.1) 0 False 1 True 2 False dtype: bool
>>> s.geom_equals_exact(Point(0, 1), tolerance=0.15) 0 True 1 True 2 False dtype: bool