Support cql2 filter on the esri provider
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Python
- Star
- 626
- Fork
- 334
- Merge trung bình
- 20 giờ 31 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của geopython/pygeoapi
-
the query parameter limit is not working for jobsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
get_collection_map does not parse the transparent query parameterCó thể đã có người làm @ozenyunus35 đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
map providers can sometimes be passed incorrect bbox-crs valueCó thể đã có người làm @ozenyunus35 đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của geopython/pygeoapi
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
EchoTools/nevr-runtime#651 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend rt sev-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
noontide-co/mainbranch#1211 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adaptersĐang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
dbt-labs/dbt#16784 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày