Closed rgwozdz closed 1 month ago
Latest commit: 944213faeabbe6cf5dc4432470ef6736b1f59d80
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
File Path | Statements | Branches | Functions | Lines |
---|---|---|---|---|
packages/winnow/src/filter-and-transform/filter-and-transform.js | 100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
packages/winnow/src/filter-and-transform/filters/contains.js | 100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
packages/winnow/src/filter-and-transform/filters/envelope-intersects.js | 100.0 vs 95.0 |
100.0 vs 88.2 |
100.0 vs 100.0 |
100.0 vs 100.0 |
packages/winnow/src/filter-and-transform/filters/helpers.js | 100.0 vs (NA) |
100.0 vs (NA) |
100.0 vs (NA) |
100.0 vs (NA) |
packages/winnow/src/filter-and-transform/filters/intersects.js | 100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
packages/winnow/src/filter-and-transform/filters/within.js | 100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
packages/winnow/src/normalize-query-options/geometry-filter.js | 97.0 vs 97.0 |
88.0 vs 84.6 |
100.0 vs 100.0 |
97.0 vs 96.9 |
packages/winnow/src/sql-query-builder/where-builder/index.js | 100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
100.0 vs 100.0 |
Recent testing shows that in certain circumstances, filtering by geometry did not work as it should. The test case that surfaced the initial issue was:
Context: dataset type:
Multipolygon
feature collection geometry filter:envelope
spatial relation:intersects
When the filter envelope completely contained one of the multi-polygon features, it was found to be excluded from the returned feature set.
Following this discovery I performed an audit on all of Koop's supported geometric filtering operations: intersects, contains, within. I found the
within
implementation to be incorrect. Extensive testing on ArcGIS Server indicates:within
: return any features that this search geometry is found withincontains
: return any features contained within this search geometryintersects
: return any features contained intersecting this search geometryIn addition, some multi- geometries were not being supported in the
contains
operation. This PR ensures geometry filtering follows the above rules for all appropriate geometry types.