Skip to content

Commit

Permalink
rename to _initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
savente93 committed Apr 2, 2024
1 parent 4bee82f commit a7b7243
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hydromt/components/geoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ def data(self) -> Dict[str, Union[GeoDataFrame, GeoSeries]]:
Return dict of geopandas.GeoDataFrame or geopandas.GeoDataSeries
"""
if self._data is None:
self._initialize_geoms()
self._initialize()

assert self._data is not None
return self._data

def _initialize_geoms(self, skip_read=False) -> None:
def _initialize(self, skip_read=False) -> None:
"""Initialize geoms."""
if self._data is None:
self._data = dict()
Expand All @@ -70,7 +70,7 @@ def set(self, geom: Union[GeoDataFrame, GeoSeries], name: str):
name: str
Geometry name.
"""
self._initialize_geoms()
self._initialize()
assert self._data is not None
if name in self._data:
self._logger.warning(f"Replacing geom: {name}")
Expand Down Expand Up @@ -100,7 +100,7 @@ def read(self, geom_fn: str = DEFAULT_GEOM_FILENAME, **kwargs) -> None:
`geopandas.read_file` function.
"""
self._root._assert_read_mode()
self._initialize_geoms(skip_read=True)
self._initialize(skip_read=True)
read_path = join(self._root.path, geom_fn)
fn_glob, regex = capture_glob(read_path)
fns = glob(fn_glob)
Expand Down

0 comments on commit a7b7243

Please sign in to comment.