metno / aerovaldb

aerovaldb is the database-interface used in the aeroval-API to send data to aeroval database instances like https://aeroval.met.no . Data is usually provided by PyAerocom.
https://aerovaldb.readthedocs.io
GNU General Public License v3.0
1 stars 1 forks source link

add maps_overlay entry point #81

Closed AugustinMortier closed 2 months ago

AugustinMortier commented 2 months ago

Needed: new entry point to get png path (similar to report images).

obsmod being the source (can be either a model or an observation network)

We might need a more general wms entry point with a zoom level parameter, but this entry point will allow users to test the new png maps feature in the meatime.

Context

AugustinMortier commented 2 months ago

see api: MR25

thorbjoernl commented 2 months ago

After discussion with @heikoklein, this should be extended to provide two endpoints:

get_image_layer() - Returns json with information about the images? Need specification about what information it should contain.

get_map_overlay() - The existing endpoint for fetching the images. Route should include extra information about zoom, x, y, metadata (?)

eg. /maps_overlays/{project}/{experiment}/{obsmod}/{variable}/{date}/{zoom}/{x}/{y} with file path /project/experiment/contour/overlay/{obsmod}_{variable}_{date}_{zoom}_{x}_{y}.png

@AugustinMortier

AugustinMortier commented 2 months ago

In the current working version (overlays, but nor wms), I have just completed the maps info available in the config file. So, pyaerocom should just write in those info into the cfg file.

    "modelmaps_opts": {
        "maps_res_deg": 5,
        "type": "overlay",
        "boundaries": {
            "west": -50.0,
            "east": 90.0,
            "south": 25.0,
            "north": 85.0
        },
        "color_scale": {
            "vcdno2": {
                "levels": [
                    0,
                    5,
                    10,
                    15,
                    20,
                    25,
                    30,
                    35,
                    40,
                    45,
                    50
                ],
                "color_map": "coolwarm",
                "units": "ppb"
            }
        }
AugustinMortier commented 2 months ago

I would say the wms solution with different zoom levels support should be a different issue. It's not ready on pyaerocom yet..