Skip to content

Commit

Permalink
Merge pull request #286 from spatial-data-lab/main
Browse files Browse the repository at this point in the history
Merge into 1.2
  • Loading branch information
koettert authored Sep 19, 2023
2 parents f9733e1 + 31d1446 commit 89cd87c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion knime_extension/geospatial_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,3 @@ dependencies:
- pointpats=2.3.0
- pip:
- ipinfo==4.4.3
- pyecharts==2.0.4
6 changes: 3 additions & 3 deletions knime_extension/src/nodes/spatialclustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def execute(self, exec_context: knext.ExecutionContext, input_1):
import pandas as pd
import numpy as np

k = 2 ^ self.grid_k
k = 2**self.grid_k

gdf0 = knut.load_geo_data_frame(input_1, self.geo_col, exec_context)
gdf = gp.GeoDataFrame(geometry=gdf0.geometry, crs=gdf0.crs)
Expand Down Expand Up @@ -759,7 +759,7 @@ def Peano(x, y, k):
for i in range(gdf.shape[0]):
x = gdf.loc[(gdf.theid == i), "unitx"].item()
y = gdf.loc[(gdf.theid == i), "unity"].item()
gdf.loc[(gdf.theid == i), "peanoorder"] = Peano(x, y, self.grid_k)
gdf.loc[(gdf.theid == i), "peanoorder"] = Peano(x, y, k)
exec_context.set_progress(
i / row_count, f"Processing row {i} of {row_count}"
)
Expand Down Expand Up @@ -1337,7 +1337,7 @@ def MergeIsolated(tmpMixedClusFC, theClus):
lyr5 = tmpMixedClusFC[tmpMixedClusFC.index == theClus]
theClusID = lyr5.FinalClus.to_list()[0]
# get satified layer out
lyr6 = tmpMixedClusFC[tmpMixedClusFC[isolateid] == 0]
lyr6 = tmpMixedClusFC[tmpMixedClusFC["isolate"] == 0]
# get weight
wq = libpysal.weights.Rook.from_dataframe(tmpMixedClusFC)
w_mix = wq.neighbors
Expand Down

0 comments on commit 89cd87c

Please sign in to comment.