Skip to content

Commit

Permalink
Merge pull request #58 from PDOK/features
Browse files Browse the repository at this point in the history
Initial implementation of OGC API Features
  • Loading branch information
rkettelerij authored Sep 28, 2023
2 parents 566755c + 4c156d5 commit 1051b7f
Show file tree
Hide file tree
Showing 53 changed files with 4,428 additions and 193 deletions.
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ Pulls](https://img.shields.io/docker/pulls/pdok/gokoala.svg)](https://hub.docker

## Description

This server implements modern OGC APIs such as OGC Common Core, OGC Tiles, OGC
Styles. In the future other APIs like OGC Features or OGC Maps may be added. The
goal of this server is to keep a narrow focus and not implement every aspect of
This server implements modern OGC APIs such as Common, Tiles, Styles. The goal of
this server is to keep a narrow focus and not implement every aspect of
these APIs, for complex logic this application will delegate to other implementations.
For example vector tiles hosting is delegated to a vector tile engine or object storage,
raster map hosting may be delegated to a WMS server, etc.
Expand All @@ -28,22 +27,21 @@ _one_ dataset.

## Features

- [OGC API Common](https://ogcapi.ogc.org/common/) support: Serves landing page
- [OGC API Common](https://ogcapi.ogc.org/common/) serves landing page
and conformance declaration. Also serves OpenAPI specification and interactive
Swagger UI.
- Comes with default OGC OpenAPI specs out-of-the box with option to overwrite
with your own custom spec.
- [OGC API Tiles](https://ogcapi.ogc.org/tiles/) support: Serves HTML, JSON and
TileJSON metadata. Serves as a proxy in front of a vector tiles engine of your
- [OGC API Tiles](https://ogcapi.ogc.org/tiles/) serves HTML, JSON and
TileJSON metadata. Act as a proxy in front of a vector tiles engine of your
choosing. Currently support for 3 projections (RD, ETRS89 and WebMercator) is included.
- [OGC API Styles](https://ogcapi.ogc.org/styles/) support: Serves HTML and JSON
representation of supported styles.
- [OGC API 3D GeoVolumes](https://ogcapi.ogc.org/geovolumes/) support: Serves
HTML and JSON metadata and functions as a proxy in front of a [3D
Tiles](https://www.ogc.org/standard/3dtiles/) server of your choosing.
- [OGC API Processes](https://ogcapi.ogc.org/processes/) provides a proxy for
- [OGC API Styles](https://ogcapi.ogc.org/styles/) serves HTML and JSON representation of supported styles.
- [OGC API 3D GeoVolumes](https://ogcapi.ogc.org/geovolumes/) serves HTML and JSON metadata and functions as a proxy
in front of a [3D Tiles](https://www.ogc.org/standard/3dtiles/) server of your choosing.
- [OGC API Processes](https://ogcapi.ogc.org/processes/) act as a passthrough proxy to
an OGC API Processes implementation, but enables the use of the OGC API Common
features of GoKoala.
- [OGC API Features](https://ogcapi.ogc.org/features/) _in development_.

## Build

Expand Down Expand Up @@ -130,13 +128,12 @@ A similar flow can be used to profile memory issues.

Design principles:

- Performance and scalability are key!
- The `ogc` [package](ogc/README.md) contains logic per specific OGC API
building block.
- The `engine` package should contain general logic. `ogc` may reference
`engine`.
> :warning: The other way around is not allowed!
- The OGC API Specifications are multi-part standards, this means
that parts can be enabled or disabled, the code should reflect this.
- Geospatial related configuration is done through the config file, technical
configuration (host/port/etc) is done through CLI flags/env variables.
- Fail fast, fail hard: do as much pre-processing/validation on startup instead
Expand All @@ -161,8 +158,7 @@ already being taken care of when building the Docker container image.

### IntelliJ / GoLand

- Install the [Go
Template](https://plugins.jetbrains.com/plugin/10581-go-template) plugin
- Install the [Go Template](https://plugins.jetbrains.com/plugin/10581-go-template) plugin
- Open `Preferences` > `Editor` > `File Types` select `Go Template files` and
add the following file patterns:
- `"*.go.html"`
Expand All @@ -179,8 +175,7 @@ Also:

### VSCode

- Install the [Go
Template](https://marketplace.visualstudio.com/items?itemName=jinliming2.vscode-go-template)
- Install the [Go Template](https://marketplace.visualstudio.com/items?itemName=jinliming2.vscode-go-template)
extension
- Open Extension Settings and add the following file patterns:
- `"*.go.html"`
Expand All @@ -189,6 +184,20 @@ Also:
- Also add `html` and `json` to the list of Go template languages.
- Now you'll have IDE support in the GoKoala templates.

### OGC compliance validation

Use the OGC [TEAM Engine](https://cite.opengeospatial.org/teamengine/) to validate
compliance when available. In the case of OGC API Features follow these steps:

- Run `docker run -p 8081:8080 ogccite/ets-ogcapi-features10`
- Open http://localhost:8081/teamengine/
- Start GoKoala.
- When running Docker in a VM (like on macOS) make sure to start GoKoala with base url: http://host.docker.internal:8080.
- Start a new test session in the TEAM Engine against http://localhost:8080 (or http://host.docker.internal:8080).
- More details in the [features conformance test suite](https://opengeospatial.github.io/ets-ogcapi-features10/).
- Publish test results HTML report in [docs](./docs/ogc-features-test-report) and list below.
- Test results on [27-09-2023](https://htmlpreview.github.io/?https://github.com/PDOK/gokoala/blob/features/docs/ogc-features-test-report/20230927.html)

## Misc

### How to Contribute
Expand Down
12 changes: 12 additions & 0 deletions assets/css/gokoala.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ footer {

/* tables */
td {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-all;
}
.table-sm td p {
margin: 0;
Expand All @@ -50,6 +52,16 @@ td {
.table-sm>:not(caption)>*>* {
padding: 0.10rem;
}
.table-striped>thead>tr>th {
color: var(--bs-white);
background-color: var(--bs-blue);
}
.table-striped>thead>tr>th a {
color: var(--bs-white);
}
.table-striped>thead>tr>th a:hover {
color: var(--lightblue);
}

.vectortile-view {
flex-grow: 1;
Expand Down
11 changes: 9 additions & 2 deletions assets/i18n/active.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pages to see what zoom levels are supported by this API."""

# Conformance page
ConformanceAbstract = """
Below are references to OGC API conformance classes to which this service conforms."""
Below are references to OGC API conformance classes to which this service conforms. <br/>The status column indicates whether the given specification is deemed an official standard by the OGC."""
Standard = "Standard"
Draft = "Draft"

Expand All @@ -71,7 +71,7 @@ The tiles can be requested via the URL template below, where
In some tools it is also possible to load this through
<a href="tiles/EuropeanETRS89_LAEAQuad?f=tilejson">TileJSON</a>."""
AvailableZoomLevels = "The tiles are available at the following zoomlevels"
ZoomLevel = "Zoomlevel"
ZoomLevel = "Zoom level"
MinimumValue = "Minimum value"
MaximumValue = "Maximum value"
View = "View"
Expand All @@ -89,3 +89,10 @@ ViewCollectionAs = "View collection as"
Extent = "Geographic extent"
GoTo = "Go to the"
ViewIn = "View in the"

# Features page
Geometry = "geometry"
Prev = "Previous"
Next = "Next"
Limit = "Show"
Items = "items"
9 changes: 8 additions & 1 deletion assets/i18n/active.nl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pagina's om te zien welke zoomniveaus door deze API worden ondersteund."""

# Conformance page
ConformanceAbstract = """
Hieronder staan verwijzingen naar de OGC API conformiteitsklassen waaraan deze service voldoet."""
Hieronder staan verwijzingen naar de OGC API conformiteitsklassen waaraan deze service voldoet. <br/>De statuskolom geeft aan of de betreffende specificatie reeds tot officiele standaard is verklaard door het OGC."""
Standard = "Standaard"
Draft = "Concept"

Expand Down Expand Up @@ -94,3 +94,10 @@ ViewCollectionAs = "Bekijk collectie als"
Extent = "Geografische begrenzing"
GoTo = "Ga naar de"
ViewIn = "Bekijk in de"

# Features page
Geometry = "geometrie"
Prev = "Vorige"
Next = "Volgende"
Limit = "Toon"
Items = "items"
Loading

0 comments on commit 1051b7f

Please sign in to comment.