Open 12rambau opened 10 months ago
visParams
is (or must be) a dict
, but in some functions inside helpers.py
I handle some parameters, like bands
, to match the API requirements, and that's why I use the word params
and not viz_params
, params
can be passed as a list
(99.9% of the time) or a str
vis = {
bands: ['B1', 'B2', 'B3'], # this is a param
min: 0,
max: 1
}
in this example vis
is the var that contains the visParams
(visualization parameters)
When I read this method I don't manage to understand the type of the params. Looking t the first line (
params = visParams or {}
) I have the feeling it's a list. But then You go through great extend to check if it's a list or a comma separeted str. To finally treat it as a list again inthemin = params.get("min") if "min" in params else "0"
Do you remenber what you envisioned and do you think we could simply use a list parameter ?
https://github.com/Louis-Dreyfus-Company/geeservermap/blob/e0bc8a96f6d68f0b42dc5163d129bc6517f87396/geeservermap/helpers.py#L44