Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

map providers can sometimes be passed incorrect bbox-crs value

Đang mở
#2,443 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ozenyunus35 đang làm issue này rồi.

Từ ngày 15/10/2026.

  • #2446 của @ozenyunus35 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Start in pygeoapi/api/maps.py around lines 179-183, where bbox is reprojected from bbox-crs to crs and query_args['bbox'] is replaced without updating query_args['bbox-crs']. Check the linked pull request #2446 first, since it already addresses this. Done means the bbox-crs value passed to the map provider's query() matches the CRS of the transformed bbox.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

when preparing a response for a static map request, pygeoapi does some pre-processing of inputs and then passes them to a map provider for rendering the image.

After initial parsing, if bbox-crs is different from crs, pygeoapi transforms the bbox parameter to the crs specified in crs, as can be seen in:

https://github.com/geopython/pygeoapi/blob/990e5f72ec938b3ad7aca5e493dda736806ebd6a/pygeoapi/api/maps.py#L179-L183

The result of this coordinate transformation is then used to replace the value of query_args['bbox']. However, the value of query_args['bbox_crs'] is never updated to match the CRS of the newly transformed bbox.

This means that when the map provider is given the query_args dict, it can sometimes contain an incorrect value for the bbox-crs key.

As an example, I'm seeing these as the input parameters to my custom map provider's query() method:

{
    'self': <BaseProvider> map, 
    'style': None, 
    'bbox': [-20037508.342789244, -20037471.205137063, 20037508.342789244, 20037471.205137063], 
    'width': 500, 
    'height': 300, 
    'crs': 'http://www.opengis.net/def/crs/EPSG/0/3857', 
    'transparent': True, 
    'format_': 'png', 
    'kwargs': {
        'bbox-crs': 'http://www.opengis.net/def/crs/OGC/1.3/CRS84', 'datetime_': None
    }
}

It can be seen that even though the contents of bbox is in 3857, the bbox-crs is still set to CRS84.

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của geopython/pygeoapi

Tất cả issue của geopython/pygeoapi

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.