Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Support cql2 filter on the esri provider

オープン
#2,433 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@fredmorin がすでに取り組んでいます。

2026年10月9日 から。

  • #2434 @fredmorin による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
22/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api, backend

調査の方向性

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 の本文から書いたものです。

説明

enhancement

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 where clause: logical operators
    (AND, OR, NOT), comparisons (=, <>, <, <=, >, >=), LIKE,
    IN, BETWEEN, IS NULL, and temporal predicates (T_BEFORE, T_AFTER,
    T_EQUALS, T_DURING) with DATE/TIMESTAMP literals.
  • A single spatial predicate (S_INTERSECTS, S_WITHIN, S_CONTAINS,
    S_CROSSES, S_TOUCHES, S_OVERLAPS, BBOX) → ESRI geometry,
    geometryType and spatialRel parameters, combinable with
    attribute/temporal filters via a top-level AND.

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 with bbox is 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_DISJOINT is 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 bbox query parameter cannot be combined with a CQL2 spatial predicate.
  • S_WITHIN uses the native esriSpatialRelWithin, which does not return point
    features within a polygon; S_INTERSECTS is 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

geopython/pygeoapi のほかの issue

geopython/pygeoapi の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。