opengeospatial / styles-and-symbology

OGC Styles & Symbology Standards
Other
11 stars 6 forks source link

Complex use cases benefiting from later rules overriding earlier ones #40

Open jerstlouis opened 1 year ago

jerstlouis commented 1 year ago

Existing conformance classes required for this use case:

See also http://ogc.standardstracker.org/show_request.cgi?id=519

Example stylesheet:

#Thermokarst
{ 
   [TKWP = 'Low'                                    ]{ fill: { #a1ff74 }; }
   [TKThLP = 'Low'                                  ]{ fill: { #74b2ff }; }
   [TKHP = 'Low'                                    ]{ fill: { #fd846d }; }
   [TKWP = 'Low' AND TKHP = 'Low'                   ]{ fill: { #f7ff7c }; }
   [TKWP = 'Low' AND TKThLP = 'Low'                 ]{ fill: { #beffe9 }; }
   [TKWP = 'Low' AND TKThLP = 'Low' AND TKHP = 'Low']{ fill: { #9d9d9d }; }
   [TKWP = 'Moderate'                               ]{ fill: { #4de600 }; }
   [TKThLP = 'Moderate'                             ]{ fill: { #0070ff }; }
   [TKHP = 'Moderate'                               ]{ fill: { #fe0001 }; }
   [TKWP = 'Moderate' AND TKHP = 'Moderate'         ]{ fill: { #eae600 }; }
   [TKThLP = 'Moderate' AND TKHP = 'Moderate'       ]{ fill: { #ff00c4 }; }
   [TKWP = 'Moderate' AND TKThLP = 'Moderate'       ]{ fill: { #00e7a9 }; }
   [TKWP = 'High'                                   ]{ fill: { #39a60d }; }
   [TKThLP = 'High'                                 ]{ fill: { #014da9 }; }
   [TKHP = 'High'                                   ]{ fill: { #9a0602 }; }
   [TKWP = 'High' AND TKThLP = 'High'               ]{ fill: { #00a882 }; }
   [TKWP = 'Very High'                              ]{ fill: { #334d27 }; }
   [TKThLP = 'Very High'                            ]{ fill: { #002674 }; }
   [TKWP = 'Very High' AND TKThLP = 'Very High'     ]{ fill: { #007f7e }; }
}

Describe any capability not already addressed by existing conformance classes:

none

Example image illustrating the portrayal use case:

download

thermokarst

https://youtu.be/ZrDHKfqzprA?t=477

[12] Olefeldt, D., Goswami, S., Grosse, G., Hayes, D., Hugelius, G., Kuhry, P., McGuire, A.D, Romanovsky, V.E, Sannel, A.B.K., Schuur, E.A.G., Turetsky, M.R: Circumpolar distribution and carbon storage of thermokarst landscapes. Nature Communications, 7, 13043. Available at: https://www.nature.com/articles/ncomms13043#f3 (2016)

See also Testbed 13 ER: https://docs.ogc.org/per/17-041.html

jerstlouis commented 1 year ago

This use case here made me think that perhaps considering the possible values here as an enumeration type (which we already have in the Core Expressions model) instead of as a string would potentially make it easier to style both simple vector data based on attributes and categorical coverage data using exactly the same style sheet.

In both cases, a numeric value would be associated with the enumeration values. In vector datasets it is often a separate join .csv table with the values / name, whereas for a gridded coverage, perhaps the range type could be extended to include that information.

For the selector, it would already be possible to use numeric integer values.

There is also the consideration of fill: vs. colorChannels:. The behavior of what happens if you use fill with coverage or colorChannels with vector could be specified in some requirements class.