Skip to content

Commit b586eb3

Browse files
authored
Merge pull request #4 from eodash/lubojr-patch-1
add eodash-schemas to overview of repos
2 parents 8358036 + 4d7af7a commit b586eb3

File tree

7 files changed

+1925
-727
lines changed

7 files changed

+1925
-727
lines changed

.vitepress/config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export default defineConfig({
3838
items: [
3939
{ text: 'Content integration', link: '/content' },
4040
{ text: 'Data configuration', link: '/data' },
41+
{ text: 'Styling', link: '/styling' },
4142
{ text: 'Storytelling', link: '/storytelling' },
4243
]
4344
}

components.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@
1313
* [catalog-template](https://github.com/eodash/catalog-template)
1414
- template repo with example setup for a catalog configuration and deployment as github pages
1515
* [eodash-docs](https://github.com/eodash/eodash-docs)
16-
- central location for eodash ecosystem documentation
16+
- central location for eodash ecosystem documentation
17+
* [eodash-schemas](https://github.com/eodash/eodash-schemas)
18+
- JSON schemas for eodash catalog configs for purposes of validation - matching [eodash catalog wiki entries](https://github.com/eodash/eodash_catalog/wiki)

content.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Content integration
22

3-
We see at least three ways for contributing content to an instantiated eodash ecosystem:
4-
* Earth Observation (related) data
3+
We see at least four ways for contributing content to an instantiated eodash ecosystem:
4+
* Earth Observation (related) [data](./data), see also [styling](./styling) guide.
55
* Stories for the [Storytelling](./storytelling) element
6+
* Adding processing [processing](./processing) definitions
67
* Additional static pages
78

89
The basic process content submission is expected to be done through configuration and content files via a version control system such as git. Depending on how the eodash ecosystem is integrated into a platform it is possible that abstraction layers, such as custom user interfaces (such as Content Management Systems) or helper tools are build on top to help users of the platform.

data.md

Lines changed: 93 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,59 @@
33
An eodash instance expects to load its content from a STAC catalog. This catalog can be generated using the [eodash_catalog](https://github.com/eodash/eodash_catalog). As can be seen in the [catalog wiki](https://github.com/eodash/eodash_catalog/wiki/Resource) there are multiple services supported.
44

55
We consider eodash to be a data integrator, so we find a "serverless" approach for data integration to be a great opportunity to not require more complex setups when wanting to share your data, apart from making them reachable online. For this we want to give explanations and examples of how this can be done for raster and vector data.
6-
Currently we support Cloud Optimized GeoTIFFs (COGs) for raster and GeoJSON files for vector data. We want to support cloud optimized formats for vector data as soon as possible.
6+
Currently we support Cloud Optimized GeoTIFFs (COGs) for raster and GeoJSON or FlatGeoBuf files for vector data.
7+
8+
For all three types of files, returned [CORS headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS) on the server side need to be correctly set up in order to let the eodash in a browser access them directly from a different domain than eodash is usually running on. You can use [following CORS validator](https://cors-test.codehappy.dev/) - (not affiliated with eodash project, use at your own discretion) for your resources to check if the response CORS headers are set up correctly for access from the domain where eodash is/will be hosted.
79

810
For both data types we wanted to introduce a shared language that gives the user the tools to fully describe how they should be rendered and interacted with. This is achieved by using a style JSON configuration file that utilizes the languages of [OpenLayers flat style](https://openlayers.org/en/latest/apidoc/module-ol_style_flat.html) as well as [JSON Form](https://github.com/jsonform/jsonform/wiki#using-json-schema-to-describe-your-data-model) definition language as extended by the EOxElement [eox-jsonform](https://eox-a.github.io/EOxElements/?path=/docs/elements-eox-jsonform--docs).
911
The style reference for STAC as a possible extension is being discussed [here](https://github.com/radiantearth/stac-spec/issues/1284). We currently take the proposed 3B approach.
1012

11-
Following is the catalog structure that would be generated when using the catalog creation helper tool.
13+
Following is the catalog structure that would be generated when using the [eodash_catalog](https://github.com/eodash/eodash_catalog) tool.
1214

1315
![STAC catalog structure](./assets/data_definition.png)
1416

15-
Datasets can be referenced as assets within one item (i.e. TimeEntry) and then utilized as part of the style. Let's look at some examples.
17+
Datasets can be referenced as assets within one item (i.e. TimeEntry) and then utilized as part of the style.
1618

1719
## Vector data
1820

19-
Here is an example configuration for the catalog tool to add a geojson:
21+
Here is an example configuration for the catalog tool to add a GeoJSON file:
2022

21-
```yaml
22-
Name: example_collection
23-
Title: Example collection for vector data
24-
EodashIdentifier: exmpl1
25-
Description: This can be **markdown** text
26-
Resources:
27-
- Name: GeoJSON source
28-
Style: https://location.of/vector_style.json
29-
Bbox: [9.27, 46.2, 17.3, 49.2]
30-
TimeEntries:
31-
- Time: "2024"
32-
Assets:
33-
- Identifier: vector_data
34-
File: https://location.of/file.json
23+
```json
24+
{
25+
"Name": "example_collection",
26+
"Title": "Example collection for vector data",
27+
"EodashIdentifier": "exmpl1",
28+
"Description": "This can be **markdown** text",
29+
"Resources": [
30+
{
31+
"Name": "GeoJSON source",
32+
"Style": "https://location.of/vector_style.json",
33+
"Bbox": [
34+
9.27,
35+
46.2,
36+
17.3,
37+
49.2
38+
],
39+
"TimeEntries": [
40+
{
41+
"Time": "2024",
42+
"Assets": [
43+
{
44+
"Identifier": "vector_data",
45+
"File": "https://location.of/file.json"
46+
}
47+
]
48+
}
49+
]
50+
}
51+
]
52+
}
3553

3654
```
3755

38-
Let's now look at the style definition options. Firstly we can explore the [flat style definition](https://openlayers.org/en/latest/apidoc/module-ol_style_flat.html) of OpenLayers. Here is a very basic example of how to style some things:
56+
([FlatGeobuf resource](https://github.com/eodash/eodash_catalog/wiki/Resource#raw-sources) would just have a different Resource Name)
57+
58+
Here is a very basic example of how to style vector data:
3959
```json
4060
{
4161
"fill-color": "red",
@@ -46,140 +66,75 @@ Let's now look at the style definition options. Firstly we can explore the [flat
4666

4767
![vector data rendering example](./assets/vector_styled_1.png)
4868

69+
For more possibilities of vector data styling, description of parameters and options, please see dedicated [styling guide](./styling#vector-styling).
4970

50-
In order to define interaction options for the user this can be extended with variables, combined with JSON Form definition. To continue the example, let's say, we would like the user to be able to change the stroke-width with a slider, we can extend the style file like this:
51-
```json
71+
## Raster data
72+
73+
Here is an example configuration for the catalog tool to add two single band COGs.
74+
75+
```yaml
5276
{
53-
"variables": {
54-
"strokeWidth": 1
55-
},
56-
"fill-color": "red",
57-
"stroke-color": "black",
58-
"stroke-width": ["var", "strokeWidth"],
59-
"jsonform": {
60-
"type": "object",
61-
"title": "Data configuration",
62-
"properties": {
63-
"strokeWidth": {
64-
"type": "number",
65-
"minimum": 0,
66-
"maximum": 10,
67-
"format": "range",
68-
"default": 0
69-
}
77+
"Name": "example_collection",
78+
"Title": "Example collection for raster data",
79+
"EodashIdentifier": "exmpl2",
80+
"Description": "This can be **markdown** text",
81+
"Resources": [
82+
{
83+
"Name": "COG source",
84+
"Style": "https://location.of/raster_style.json",
85+
"Bbox": [
86+
9.27,
87+
46.2,
88+
17.3,
89+
49.2
90+
],
91+
"TimeEntries": [
92+
{
93+
"Time": "2024",
94+
"Assets": [
95+
{
96+
"Identifier": "cog1",
97+
"File": "https://location.of/cogfile1.tiff"
98+
},
99+
{
100+
"Identifier": "cog2",
101+
"File": "https://location.of/cogfile2.tiff"
102+
}
103+
]
70104
}
105+
]
71106
}
107+
]
72108
}
73-
```
74-
![vector data interaction rendering example](./assets/style_interaction_example.gif)
75-
76-
Taking these concepts into account, one can extend the style to use also the `get` functionality of flat styles to access feature properties of the geoJSON as well as [encoded expressions](https://openlayers.org/en/latest/apidoc/module-ol_expr_expression.html#~EncodedExpression) truly custom and interactive styles can be created.
77109

78-
## Raster data
110+
```
79111

80-
Here is an example configuration for the catalog tool to add a some cloud optimized geotiffs (COGs):
112+
In eodash and OpenLayers, each COG contributes with all it's indexed bands in a sequence to the rendering and needs to be accounted for in the style definition.
81113

82-
```yaml
83-
Name: example_collection
84-
Title: Example collection for raster data
85-
EodashIdentifier: exmpl2
86-
Description: This can be **markdown** text
87-
Resources:
88-
- Name: COG source
89-
Style: https://location.of/raster_style.json
90-
Bbox: [9.27, 46.2, 17.3, 49.2]
91-
TimeEntries:
92-
- Time: "2024"
93-
Assets:
94-
- Identifier: cog1
95-
File: https://location.of/cogfile1.tiff
96-
- Identifier: cog2
97-
File: https://location.of/cogfile2.tiff
98-
99-
```
114+
In this case, the `cogfile1.tiff` would be used as a `[band, 1]` and `cogfile2.tiff` as `[band, 2]`.
100115

101116
The style configuration for raster data functions in exactly the same way as the one described for vector data, but only uses the `color` attribute do define how your raster data is rendered.
102117

103-
Here is a more elaborate example which shows the use of `["band", 1]` to access values from the COGs, as well as normalizing the data to 0-1 values, and then applying a interpolated 16 value viridis colormap. The vmin and vmax variables are used to do the normalization allowing dynamic color range adaptation in the eodash instance. It uses band 2, to filter what data gets rendered, if the case does not apply, it renders the corresponding pixel as transparent.
104-
118+
Here is a very basic example of grayscale rendering of raster values from 0 to 400 and manually filtering `No Data areas` (value 0) as transparent:
105119
```json
106120
{
107-
"variables": {
108-
"vmin": 2,
109-
"vmax": 5,
110-
"settlementDistance": 0
111-
},
112-
"color": [
113-
"case",
114-
[
115-
"all",
116-
[">", ["band", 1], 1],
117-
[">=", ["band", 2], ["var", "settlementDistance"]]
118-
],
119-
[
120-
"interpolate",
121-
["linear"],
122-
["/", ["-", ["band", 1], ["var", "vmin"]], ["-", ["var", "vmax"], ["var", "vmin"]]],
123-
0, [68, 1, 84, 1],
124-
0.067, [70, 23, 103, 1],
125-
0.133, [71, 44, 122, 1],
126-
0.2, [65, 63, 131, 1],
127-
0.266, [59, 81, 139, 1],
128-
0.333, [52, 97, 141, 1],
129-
0.4, [44, 113, 142, 1],
130-
0.467, [39, 129, 142, 1],
131-
0.533, [33, 144, 141, 1],
132-
0.6, [39, 173, 129, 1],
133-
0.666, [66, 187, 114, 1],
134-
0.733, [92, 200, 99, 1],
135-
0.8, [131, 210, 75, 1],
136-
0.867, [170, 220, 50, 1],
137-
0.933, [212, 226, 44, 1],
138-
1, [253, 231, 37, 1]
139-
],
140-
[
141-
"color", 0, 0, 0, 0
142-
]
121+
"color": [
122+
"case",
123+
[">", ["band", 1], 0],
124+
[
125+
"interpolate",
126+
["linear"],
127+
["band", 1],
128+
0,
129+
[0, 0, 0, 1],
130+
400,
131+
[255, 255, 255, 1]
143132
],
144-
"jsonform": {
145-
"type": "object",
146-
"title": "Data configuration",
147-
"properties": {
148-
"settlementDistance": {
149-
"type": "number",
150-
"minimum": 0,
151-
"maximum": 5000,
152-
"format": "range",
153-
"default": 0
154-
},
155-
"vminmax": {
156-
"title": "Global horizontal irradiation",
157-
"description": "[kWh/m²/day]",
158-
"type": "object",
159-
"properties": {
160-
"vmin": {
161-
"type": "number",
162-
"minimum": 0,
163-
"maximum": 5,
164-
"format": "range",
165-
"default": 2
166-
},
167-
"vmax": {
168-
"type": "number",
169-
"minimum": 0,
170-
"maximum": 5,
171-
"format": "range",
172-
"default": 5
173-
}
174-
},
175-
"format": "minmax"
176-
}
177-
}
178-
}
179-
}
133+
["color", 0, 0, 0, 0]
134+
]
135+
}
180136
```
181-
Here is how that translates to a visualization in the eodash instance:
182137

183-
![raster data interaction rendering example](./assets/raster_interaction_example.gif)
138+
For more possibilities of raster data styling, description of parameters and options, please see dedicated [styling guide](./styling#raster-styling).
184139

185140
This covers the basics for "serverless" data integration. Integration of datasets provided through services do not use a style file, each endpoint provides their own configuration options which can be defined in the data definition configuration file. For more information please go to the [resource section](https://github.com/eodash/eodash_catalog/wiki/Resource) of the catalog wiki.

0 commit comments

Comments
 (0)