Skip to content

Commit 7221851

Browse files
authored
Merge pull request #138 from ESA-APEx/geospatial_explorer_examples
Geospatial explorer examples
2 parents e48ca5a + 8681e05 commit 7221851

File tree

6 files changed

+67
-19
lines changed

6 files changed

+67
-19
lines changed

.markdownlintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
interoperability/algohosting.md
22
interoperability/algohostingenv.md
3-
interoperability/geospatial_explorer.md
3+
interoperability/geospatial_explorer.qmd
44
interoperability/businessmodel.md

_deliverables/d09-icg.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ format:
2020
{{< include ../propagation/service_development.qmd >}}
2121
{{< include ../interoperability/algohosting.md >}}
2222
{{< include ../interoperability/algohostingenv.md >}}
23-
{{< include ../interoperability/geospatial_explorer.md >}}
23+
{{< include ../interoperability/geospatial_explorer.qmd >}}
2424
{{< include ../interoperability/businessmodel.md >}}

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ website:
8181
- href: propagation/service_development.qmd
8282
- href: interoperability/algohosting.md
8383
- href: interoperability/algohostingenv.md
84-
- href: interoperability/geospatial_explorer.md
84+
- href: interoperability/geospatial_explorer.qmd
8585
- href: interoperability/businessmodel.md
8686

8787
format:

guides/file_formats.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ not built-in support for conveying time information, but STAC metadata is suppor
4040

4141
To optimize visualization in the APEx Geospatial Explorer, additional guidelines have been established. Adhering to these
4242
guidelines will ensure that the data is effectively optimized for visualization on a map. Please refer to
43-
[this page](../interoperability/geospatial_explorer.md#cloud-optimized-geotiff-cog) for more information.
43+
[this page](../interoperability/geospatial_explorer.qmd#cloud-optimized-geotiff-cog) for more information.
4444

4545
## (Geo-)Zarr
4646

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ The schema is versioned as it will change throughout the APEx project as the fun
1717
Geospatial Explorer matures. This does allow for improvements and extra features to be easily added to the application,
1818
and best practices shall be followed to avoid any breaking changes between versions.
1919

20-
2120
## Requirements
2221

2322
@tbl-geoexplorer outlines the requirements for configuring an instance of the Geospatial Explorer application.
@@ -62,6 +61,7 @@ and best practices shall be followed to avoid any breaking changes between versi
6261
### Cloud Optimized GeoTiff (COG)
6362

6463
When generating Cloud Optimised GeoTiffs, it is recommended to use the GoogleMapsCompatible tiling scheme—typically 256x256 pixel tiles aligned to a global grid—and to store the image in the Web Mercator projection (EPSG:3857). The BitsPerSample field must accurately reflect the data format. Overviews are essential for performance and should be generated using downsampling by factors of two until the image dimensions are the size of a tile or smaller. These overviews should also be tiled and placed after the main image data to conform with the COG specification. An example command line invocation using GDAL would be:
64+
6565
```
6666
gdal_translate <src> <dest> -of COG -co TILING_SCHEME=GoogleMapsCompatible
6767
```
@@ -73,10 +73,10 @@ FlatGeobuf[@flatgeobuf] should be used where the statistical data is a large siz
7373

7474
Statistics should be contained within the properties entry of each feature. Each feature must contain the following properties:
7575

76-
* `id` - A short unique id string.
77-
* `name` - A description label for the feature to be shown to users.
78-
* `level` - An integer that describes the features geographical hierarchy. This should be contigious with parent and child features.
79-
* `children` - A string based comma seperated list containing the `id` of all child features.
76+
* `id` - A short unique id string.
77+
* `name` - A description label for the feature to be shown to users.
78+
* `level` - An integer that describes the features geographical hierarchy. This should be contigious with parent and child features.
79+
* `children` - A string based comma seperated list containing the `id` of all child features.
8080

8181
Datasets that have classifications (such as land use) should have key:value entires consiting of 'name':'value' and an entry with a key of 'classifications' with a value consisting of a string based comma seperated list containing all the keys for the classifications and a 'total' key with the sum of all other values. This will allow for correctly rendering bar charts and pie charts.
8282

@@ -103,9 +103,10 @@ Datasets that have classifications (such as land use) should have key:value enti
103103
![worldcover_bar_chart_example](./images/worldcover_bar_chart_example.png){width=75%}
104104

105105
Datasets that do not have classifications (such as a raster showing soil organic carbon) should contain a selection of the following entries:
106-
- mean
107-
- min
108-
- max
106+
107+
* mean
108+
* min
109+
* max
109110

110111
These values will be rendered as a table.
111112

@@ -207,7 +208,6 @@ This currently supports the following properties:
207208
* `startColor`: A string describing a valid hex or RGB/A colour value. This is used to render colour ramps and legends.
208209
* `categories`: An array of objects that contains a `lablel` (string) property and a `color` (string) property. Describes classifications within datasets such as land usage. Used to create swatch legends and statistics visualisation.
209210

210-
211211
#### Data - `data`
212212

213213
An array of objects that configures the data to be displayed in the layer. If the length is more than one a layer group will be created and all sources will be treated as one layer.
@@ -241,3 +241,51 @@ Each object currently supports the following properties:
241241
## Example Configurations
242242

243243
Numerous example configurations can be found in the [APEx Geospatial Explorer Configurations](https://github.com/ESA-APEx/apex_geospatial_explorer_configs) repository on GitHub.
244+
245+
```{python}
246+
#| echo: false
247+
from IPython.display import display, HTML
248+
import requests
249+
250+
examples_api_url = "https://api.github.com/repos/ESA-APEx/apex_geospatial_explorer_configs/contents/examples"
251+
example_base_url = "https://raw.githubusercontent.com/ESA-APEx/apex_geospatial_explorer_configs/main/examples/"
252+
example_gh_base_url = (
253+
"https://github.com/ESA-APEx/apex_geospatial_explorer_configs/tree/main/examples/"
254+
)
255+
response = requests.get(examples_api_url)
256+
examples = response.json()
257+
cards = []
258+
for example in examples:
259+
result_url = example_base_url + example["name"] + "/result.png"
260+
example_url = example_gh_base_url + example["name"]
261+
262+
config_url = example_base_url + example["name"] + "/config.json"
263+
config_response = requests.get(config_url)
264+
config = config_response.json()
265+
title = config["layout"]["navigation"]["title"]
266+
267+
card = f"""
268+
<a href='{example_url}'>
269+
<div class='card' style='width: 300px'">
270+
<p class='card-img-top'>
271+
<img src='{result_url}' class='thumbnail-image card-img' height='150'/>
272+
</p>
273+
<div class='card-body pot-contents'>
274+
<h5 class='card-title listing-title'>{title}</h5>
275+
</div>
276+
</div>
277+
</a>
278+
"""
279+
cards.append(card)
280+
281+
# Join the cards and return the result
282+
283+
card_container = f"""
284+
<div style='display: flex; flex-wrap: wrap; gap: 1rem;'>
285+
{''.join(cards)}
286+
</div></a>
287+
"""
288+
289+
display(HTML(card_container))
290+
291+
```

interoperability/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ the services within your unique environment, thereby ensuring that you achieve t
1212

1313
You can find more detailed guidelines on the following pages:
1414

15-
* [Algorithm Provider Guidelines](./algohosting.md)
16-
<br/>Discover how to make your algorithm APEx compliant and enable its use within APEx services and the larger EO community.
17-
* [Algorithm Hosting Environments](./algohostingenv.md)
18-
<br/>Explore the guidelines for integrating your algorithm hosting environment into APEx services.
19-
* [Geospatial Explorer](./geospatial_explorer.md)
20-
<br/>Learn how to integrate data sources and configure your dashboards.
15+
* [Algorithm Provider Guidelines](./algohosting.md)\
16+
Discover how to make your algorithm APEx compliant and enable its use within APEx services and the larger EO community.
17+
* [Algorithm Hosting Environments](./algohostingenv.md)\
18+
Explore the guidelines for integrating your algorithm hosting environment into APEx services.
19+
* [Geospatial Explorer](./geospatial_explorer.qmd)\
20+
Learn how to integrate data sources and configure your dashboards.

0 commit comments

Comments
 (0)