Giter Club home page Giter Club logo

Comments (4)

sylvielamythepaut avatar sylvielamythepaut commented on August 21, 2024

Hi,
Yes exactly ii is possible to create some json files with rules and styles and have Magics to use them in the skinny wms ..
I am going to create a repo on github with exmaples a "tiny" bit of documentation
Sylvie

from skinnywms.

brancomat avatar brancomat commented on August 21, 2024

Thank you,
in the meantime we tried to boil down our generic question to a couple of more specific points:

  1. how are json styles file read? are there specific names or hierarchies? A wild guess: when the contour_automatig_setting variable it set it seems to read the default syles and then the subdir with the name of the variable, is it correct?

  2. the semantic of the "match" array, i.e. how to express logical and/or in matches and what fields is it possibile to use

from skinnywms.

milanavuckovic avatar milanavuckovic commented on August 21, 2024

Hello,
I'll try to answer your questions:

  1. When contour_automatic_setting variable is set to 'ecmwf', Magics will read the metadata and try to find matches in json files (we call them layers, because they originate from ecCharts layers). If it finds something with at least one match it will use the default (first in the list) style from the list of styles.
  2. "match" is a list of dictionaries. In order for the layer to be 'matched', all the parameters in one dictionary must match. So it's dict1 OR dict2 OR dict3 etc. If a value in dictionary element is a list then one element in that list must mach. For example
    "match": [
    {
    "paramId": "34",
    "shortName": "sst"
    },
    {
    "long_name": "Sea surface temperature"
    },
    {
    "standard_name": [
    "sea_surface_temperature",
    "sea_surface_skin_temperature"
    ]
    In order to be matched here it needs to have in its metadata:
  • paramId = 34 AND shortName = sst OR
  • 'long_name' = 'Sea surface temperature' OR
  • 'standard_name' = sea_surface_temperature OR sea_surface_skin_temperature
    I hope this helps,
    Milana

from skinnywms.

tnlogy avatar tnlogy commented on August 21, 2024

Any progress with showing a minimal example of using custom styles? Tried setting the arguments to Styler, but no changes visible. Any example on how to make a custom style for a shortName in a grib file would be much appreciated.

Also tried with setting MAGICS_STYLE_PATH to a path with some styles, but no difference.

from skinnywms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.