Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

get_collection_map does not parse the transparent query parameter

Aperta
#2,444 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ozenyunus35 ci sta già lavorando.

Dal 15/10/2026.

  • #2445 di @ozenyunus35 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api

Direzione di ricerca

The string transparent is copied into query_args without conversion in pygeoapi/api/maps.py near line 135, and MapScriptProvider in pygeoapi/provider/mapscript_.py around lines 185-188 tests it as a truthy value. Read both, then check how the other parsed parameters are converted. Done means the API passes a real bool and the provider's check works for 'false'. Pull request #2445 is already open against this issue, so review or coordinate with it before writing a new patch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

When handling an OGC API Maps request, pygeoapi does not parse the transparent query parameter into a bool, as seen in:

https://github.com/geopython/pygeoapi/blob/990e5f72ec938b3ad7aca5e493dda736806ebd6a/pygeoapi/api/maps.py#L135

As seen above, if request.params['transparent'] exists, then it is stored as is in query_args['transparent'] - i.e. as a string.

This means that map providers are left to parse this parameter, unlike all other parameters, which are parsed by pygeoapi before calling the map provider.

This is also causing a bug in the built-in MapScriptProvider. This provider does not parse the transparent parameter either. It simply tries to use it, as seen in:

https://github.com/geopython/pygeoapi/blob/990e5f72ec938b3ad7aca5e493dda736806ebd6a/pygeoapi/provider/mapscript_.py#L185-L188

In the above snippet, as explained before, it is possible that transparent is a string. When that is the case, the above if check will not work as intended (because in Python all strings are truthy, i.e. if "false" evaluates to True).

Lingua principale
Python
Stelle
626
Fork
334
Merge medio
20h 31m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di geopython/pygeoapi

Tutte le issue di geopython/pygeoapi

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.