Commit 47af097
fix(geospatial): improve ncpl handling and use cKDTree for performance
This commit improves the GeospatialIndex class to better handle different
grid types:
- Use cKDTree instead of KDTree for better performance in spatial queries
- Add proper handling for VertexGrid (scalar ncpl) vs UnstructuredGrid
(array ncpl)
- Handle grid_varies_by_layer case for unstructured grids where each layer
has different geometry
- Fix line length issues in error messages for code style compliance
Note: There is a known test failure in test_intersection where structured
grids using searchsorted() return different results than DISV grids using
the KD-tree approach for edge cases. This will be addressed in a separate
commit.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 42511e0 commit 47af097
File tree
3 files changed
+28
-16
lines changed- flopy
- discretization
- utils
3 files changed
+28
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
1053 | | - | |
| 1053 | + | |
| 1054 | + | |
1054 | 1055 | | |
1055 | 1056 | | |
1056 | 1057 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
823 | 826 | | |
824 | 827 | | |
825 | 828 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 72 | + | |
| 73 | + | |
76 | 74 | | |
77 | 75 | | |
78 | 76 | | |
| |||
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
| |||
93 | 106 | | |
94 | 107 | | |
95 | 108 | | |
96 | | - | |
| 109 | + | |
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| |||
144 | 157 | | |
145 | 158 | | |
146 | 159 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 160 | + | |
152 | 161 | | |
153 | 162 | | |
154 | 163 | | |
| |||
291 | 300 | | |
292 | 301 | | |
293 | 302 | | |
294 | | - | |
295 | | - | |
| 303 | + | |
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
| |||
0 commit comments