File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1245,20 +1245,17 @@ def match_centroids(
12451245
12461246 try :
12471247 if not equal_crs (coord_gdf .crs , centroids .crs ):
1248- raise ValueError ("Set hazard and GeoDataFrame to same CRS first!" )
1249- if coord_gdf .crs is None :
12501248 raise ValueError (
1251- "Please provide a coord_gdf (coordinate GeoDataFrame)"
1252- "object with a valid crs attribute."
1249+ "Please provide coord_gdf and centroids defined in" " a common CRS."
12531250 )
1254- if centroids .crs is None :
1251+ if coord_gdf . crs is None or centroids .crs is None :
12551252 raise ValueError (
1256- "Please provide centroids " "object with a valid crs attribute ."
1253+ "Please provide coord_gdf and centroids with valid crs attributes ."
12571254 )
12581255 except AttributeError as exc :
12591256 # a crs attribute is needed for unit inference
12601257 raise ValueError (
1261- "Please provide coordinate GeoDataFrame and Hazard object with a valid crs attribute ."
1258+ "Please provide coord_gdf and centroids with valid crs attributes ."
12621259 ) from exc
12631260
12641261 # get unit of coordinate systems from axis of crs
You can’t perform that action at this time.
0 commit comments