File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2041,6 +2041,9 @@ def cell_based_association_cli(
2041
2041
geodataframe = gpd .read_file (input_vector )
2042
2042
typer .echo ("Progress: 25%" )
2043
2043
2044
+ if subset_target_attribute_values is not None :
2045
+ subset_target_attribute_values = [value .strip () for value in subset_target_attribute_values ]
2046
+
2044
2047
cell_based_association (
2045
2048
cell_size = cell_size ,
2046
2049
geodata = [geodataframe ],
Original file line number Diff line number Diff line change @@ -90,10 +90,8 @@ def cell_based_association(
90
90
raise InvalidColumnException ("Targeted column not found in the GeoDataFrame." )
91
91
92
92
for i , subset in enumerate (subset_target_attribute_values ):
93
- if subset is not None :
94
- for value in subset :
95
- if value not in geodata [i ][column [i ]].unique ():
96
- raise InvalidParameterValueException ("Subset of value(s) not found in the targeted column." )
93
+ if subset is not None and not all (value in geodata [i ][column [i ]].tolist () for value in subset ):
94
+ raise InvalidParameterValueException ("Subset of value(s) not found in the targeted column." )
97
95
98
96
# Computation
99
97
for i , data in enumerate (geodata ):
You can’t perform that action at this time.
0 commit comments