sertit.ci.assert_geom_equal¶
- assert_geom_equal(geom_1: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path, geopandas.geodataframe.GeoDataFrame], geom_2: Union[str, cloudpathlib.cloudpath.CloudPath, pathlib.Path, geopandas.geodataframe.GeoDataFrame]) None [source]¶
Assert that two geometries are equal (do not check equality between geodataframe as they may differ on other fields).
-> Useful for pytests.
>>> path = r"CI\DATA
- ectorsoi.geojson”
>>> assert_geom_equal(path, path) >>> # Raises AssertionError if sth goes wrong
Warning
- Only checks:
valid geometries
length of GeoDataFrame
CRS
- Args:
geom_1 (gpd.GeoDataFrame): Geometry 1 geom_2 (gpd.GeoDataFrame): Geometry 2