Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

map providers can sometimes be passed incorrect bbox-crs value

Abierto
#2,443 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@ozenyunus35 ya está trabajando en esto.

Desde el 15/10/2026.

  • #2446 de @ozenyunus35 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
api

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
626
Forks
334
Merge medio
20 h 31 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de geopython/pygeoapi

Todos los issues de geopython/pygeoapi

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.