Skip to content

Commit

Permalink
Fix inplace in FC
Browse files Browse the repository at this point in the history
  • Loading branch information
Sakharov committed Apr 2, 2024
1 parent 8d2c258 commit a9a7eb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions aeronet_vector/aeronet_vector/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def copy(self):
"""Returns a copy of feature"""
return Feature(shape(self.geometry), {k: v for k, v in self.properties.items()}, self.crs)

def simplify(self, tolerance: float, inplace: bool = True):
def simplify(self, tolerance: float, inplace: bool = False):
"""Simplifies geometry with Douglas-Pecker
Args:
tolerance (float): simplification tolerance
Expand All @@ -161,7 +161,7 @@ def simplify(self, tolerance: float, inplace: bool = True):
else:
return self.copy().simplify(tolerance, inplace=True)

def cast_property_to(self, key: str, new_type: type, inplace: bool = True):
def cast_property_to(self, key: str, new_type: type, inplace: bool = False):
"""Casts property to new type (e.g. str to int)
Args:
key (str): key of modified property
Expand Down
8 changes: 4 additions & 4 deletions aeronet_vector/aeronet_vector/featurecollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _valid(features):
valid_features.append(f)
return valid_features

def apply(self, func: Callable, inplace: bool = True):
def apply(self, func: Callable, inplace: bool = False):
"""Applies function to collection geometries
Args:
func (Callable): function to apply
Expand All @@ -62,7 +62,7 @@ def apply(self, func: Callable, inplace: bool = True):
else:
return FeatureCollection([f.apply(func) for f in self.features], crs=self.crs)

def filter(self, func: Callable, inplace: bool = True):
def filter(self, func: Callable, inplace: bool = False):
"""Filters collection according to func
Args:
func (Callable): filtering function
Expand Down Expand Up @@ -280,7 +280,7 @@ def copy(self):
"""Returns a copy of collection"""
return FeatureCollection((f.copy() for f in self.features), crs=self.crs)

def simplify(self, tolerance: float, inplace: bool = True):
def simplify(self, tolerance: float, inplace: bool = False):
"""Simplifies geometries with Douglas-Pecker
Args:
tolerance (float): simplification tolerance
Expand All @@ -293,7 +293,7 @@ def simplify(self, tolerance: float, inplace: bool = True):
else:
return self.copy().simplify(tolerance, inplace=True)

def cast_property_to(self, key: str, new_type: type, inplace: bool = True):
def cast_property_to(self, key: str, new_type: type, inplace: bool = False):
"""Casts property to new type (e.g. str to int)
Args:
key (str): key of modified property
Expand Down

0 comments on commit a9a7eb9

Please sign in to comment.