Skip to content

Commit

Permalink
white space cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Dec 6, 2023
1 parent c736356 commit 2880bcc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions climada/hazard/centroids/centr.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,13 @@ def from_vector_file(cls, file_name, dst_crs=None):
if dst_crs is not None:
centroids.gdf.to_crs(dst_crs, inplace=True)
return centroids

#TODO: Check whether other variables are necessary, e.g. dist to coast
@classmethod
def from_csv(cls, file_path, crs=None, var_names=None):
"""
Generate centroids from a csv file with column names in var_names.
Parameters
----------
file_path : str
Expand All @@ -688,7 +688,7 @@ def from_csv(cls, file_path, crs=None, var_names=None):
CRS. Default: DEF_CRS
var_names : dict, default
name of the variables. Default: DEF_VAR_CSV
Returns
-------
Centroids
Expand All @@ -705,7 +705,7 @@ def from_csv(cls, file_path, crs=None, var_names=None):
gdf = gpd.GeoDataFrame(df, crs=crs, geometry=geometry)
return cls.from_geodataframe(gdf)

#TODO: this method is badly written but kept for backwards compatibility. It should be improved.
#TODO: this method is badly written but kept for backwards compatibility. It should be improved.
@classmethod
def from_excel(cls, file_name, crs=None, var_names=None):
"""Generate a new centroids object from an excel file with column names in var_names.
Expand Down

0 comments on commit 2880bcc

Please sign in to comment.