Support cql2 filter on the esri provider
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 22/100
調査の方向性
Start with the RFC4 process linked in the issue and the ESRIServiceProvider class, then see how the existing provider builds its query parameters. The work is to translate the pygeofilter AST into a where clause plus geometry, geometryType and spatialRel parameters, with the 400 cases the issue lists. Done means the design is agreed in the thread and the provider's tests cover those cases.
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
The ESRI Feature Service provider (ESRIServiceProvider) does not support
Common Query Language (CQL2) filtering. While other feature providers (e.g.
PostgreSQL, Elasticsearch, OGR) let users filter collections with the filter
query parameter, ESRI-backed collections can only be filtered through bbox
and simple property equality. This is limiting when exposing ArcGIS
Feature/Map services through OGC API - Features, since ArcGIS natively supports
rich attribute, temporal and spatial querying that is currently unreachable.
Describe the solution you'd like
Add CQL2 filtering support to the ESRI provider by translating CQL2 filter
expressions (pygeofilter AST) into native ESRI query parameters:
- Attribute and temporal predicates → ESRI
whereclause: logical operators
(AND,OR,NOT), comparisons (=,<>,<,<=,>,>=),LIKE,
IN,BETWEEN,IS NULL, and temporal predicates (T_BEFORE,T_AFTER,
T_EQUALS,T_DURING) withDATE/TIMESTAMPliterals. - A single spatial predicate (
S_INTERSECTS,S_WITHIN,S_CONTAINS,
S_CROSSES,S_TOUCHES,S_OVERLAPS,BBOX) → ESRIgeometry,
geometryTypeandspatialRelparameters, combinable with
attribute/temporal filters via a top-levelAND.
Attribute values/literals should be escaped (single quotes doubled) to prevent
SQL injection, and attribute names validated against the layer fields.
Unsupported constructs should return HTTP 400.
Describe alternatives you've considered
- Client-side filtering: fetch all features and filter in pygeoapi. Rejected
— defeats the purpose of pushing queries down to the service and does not
scale. - Mapping only to
where(attributes/temporal, no spatial): simpler, but
leaves native ArcGIS spatial querying unused; combining withbboxis not
equivalent to arbitrary spatial predicates. - Using an existing pygeofilter ESRI backend: none exists upstream, so a
dedicated translation layer in the provider is the most direct approach.
Additional context
Some ESRI-specific limitations are expected and would be documented/returned as
HTTP 400:
S_DISJOINTis not expressible as an ESRI spatial relationship.- Only one spatial predicate is supported per filter.
- A spatial predicate may not be nested under
OR/NOT. - The
bboxquery parameter cannot be combined with a CQL2 spatial predicate. S_WITHINuses the nativeesriSpatialRelWithin, which does not return point
features within a polygon;S_INTERSECTSis recommended for point layers.
I have a working implementation with unit tests and documentation ready to
submit as a PR, pending discussion here (per RFC4).
- 主要言語
- Python
- スター
- 626
- フォーク
- 334
- 平均マージ
- 20時間 31分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
geopython/pygeoapi のほかの issue
-
the query parameter limit is not working for jobs再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
get_collection_map does not parse the transparent query parameter対応中かも @ozenyunus35 が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
map providers can sometimes be passed incorrect bbox-crs value対応中かも @ozenyunus35 が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 半日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
geopython/pygeoapi の issue をすべて見る
似ている issue
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsオープンarea: tools documentation good first issue ready for a contributor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
eyalgolan/statecraft-israel#873 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 5 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信