Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ Le format est basé sur [Keep a Changelog](https://keepachangelog.com/) et ce pr

## [Unreleased]

### Added
- API Maps : implémentation intégrée au service OGC API
- OGC API : possibilité de filtrer les collections par bbox
- API Admin : sécurisation par secret

### Changed
- Configuration des services : les options sont regroupées quand elles concernent un même type de service (tuilé par exemple)
- API Tiles : il n'est plus vu comme un service séparé mais est intégré au service OGC API
- Factorisation du code de calcul d'une image ou d'une tuile

### Removed
- API Common : elle est intégrée au service OGC API

## [6.2.1] - 2026-06-25

### Added
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(BUILD_SHARED_LIBS OFF)
################### PARAMÈTRES

set(BUILD_VERSION "0.0.0" CACHE STRING "Build version")
set(CPACK_SYSTEM_NAME "ubuntu-20.04" CACHE STRING "Building OS, to deduce package format to generate")
set(CPACK_SYSTEM_NAME "ubuntu-22.04" CACHE STRING "Building OS, to deduce package format to generate")
set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Installation location")
set(DEBUG_BUILD 0 CACHE BOOL "Debug mode compilation")
set(UNITTEST_ENABLED 1 CACHE BOOL "Unit tests compilation")
Expand Down Expand Up @@ -62,6 +62,7 @@ message(STATUS "Building ROK4 Server")

file(GLOB ROK4SERVER_SRCS
"${PROJECT_SOURCE_DIR}/src/*.cpp"
"${PROJECT_SOURCE_DIR}/src/core/*.cpp"
"${PROJECT_SOURCE_DIR}/src/services/*.cpp"
"${PROJECT_SOURCE_DIR}/src/services/*/*.cpp"
"${PROJECT_SOURCE_DIR}/src/configurations/*.cpp"
Expand Down
88 changes: 82 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

![ROK4 Logo](https://rok4.github.io/assets/images/rok4-256.png)

Le serveur implémente les standards ouverts de l’Open Geospatial Consortium (OGC) WMS 1.3.0, WMTS 1.0.0 et OGC API Tiles 1.0.0, ainsi que le TMS (Tile Map Service). Il vise deux objectifs principaux :
Le serveur implémente les standards ouverts de l’Open Geospatial Consortium (OGC) WMS 1.3.0, WMTS 1.0.0 et OGC API Tiles et Maps, ainsi que le TMS (Tile Map Service). Il vise deux objectifs principaux :

* L’utilisation d’un cache de données raster unique permettant de servir indifféremment des flux WMS, WMTS, API Tiles et TMS
* L’utilisation d’un cache de données raster unique permettant de servir indifféremment des flux WMS, WMTS, OGC API Tiles et Maps et TMS
* Des performances de traitement d’image et de diffusion accrues
* La diffusion de tuiles vecteur telles qu'elles sont stockées, sans transformation (TMS uniquement)
* La diffusion en WMTS selon des Tile Matrix Sets différents de celui de la pyramide utilisée.
Expand Down Expand Up @@ -117,6 +117,82 @@ check-jsonschema /path/to/your/server.json --schemafile ./config/server.schema.j
check-jsonschema /path/to/your/services.json --schemafile ./config/services.schema.json
```

#### Convertir la configuration des services v6 -> v7+

La commande `jq` suivante permet d'obtenir la structure de la configuration v7+ à partir de la configuration v6 :

```bash
jq '
. |
{
enabled: true,
global: {
provider: .provider,
site: .site,
fee: .fee,
access_constraint: .access_constraint,
contact: .contact,
crs_equivalences: .crs_equivalences,
default_style: .default_style,
inspire: .wms.inspire,
map: {
limits: .wms.limits,
formats: .wms.formats,
crs: .wms.crs,
reprojection: .wms.reprojection
},
tile: {
reprojection: .wmts.reprojection
}
},
admin: .admin,
health: .health,
wms: {
enabled: .wms.enabled,
endpoint_uri: .wms.endpoint_uri,
root_path: .wms.root_path,
title: .wms.title,
abstract: .wms.abstract,
keywords: .wms.keywords,
metadata: .wms.metadata,
name: .wms.name,
root_layer: .wms.root_layer
},
wmts: {
enabled: .wmts.enabled,
endpoint_uri: .wmts.endpoint_uri,
root_path: .wmts.root_path,
title: .wmts.title,
abstract: .wmts.abstract,
keywords: .wmts.keywords,
metadata: .wmts.metadata
},
tms: {
enabled: .tms.enabled,
endpoint_uri: .tms.endpoint_uri,
root_path: .tms.root_path,
title: .tms.title,
abstract: .tms.abstract,
keywords: .tms.keywords,
metadata: .tms.metadata
},
ogcapi: {
enabled: .tiles.enabled,
endpoint_uri: (.tiles.endpoint_uri | sub("/tiles"; "/ogcapi")),
root_path: "/ogcapi",
title: (.tiles.title | sub(" Tiles"; "")),
abstract: (.tiles.abstract | sub(" Tiles"; "")),
keywords: .tiles.keywords,
metadata: .tiles.metadata,
tiles: true,
maps: true,
default_size: 256
}
}
' services.json
```


### Lancer le serveur

#### En ligne de commande
Expand Down Expand Up @@ -176,7 +252,7 @@ On redémarre nginx : `systemctl restart nginx`
- WMS : http://localhost/rok4/wms?request=GetCapabilities&service=WMS
- WMTS : http://localhost/rok4/wmts?request=GetCapabilities&service=WMTS
- TMS : http://localhost/rok4/tms/1.0.0
- OGC API Tiles : http://localhost/rok4/tiles/collections
- OGC API : http://localhost/rok4/ogcapi/collections
* Racine de l'API d'administration : http://localhost/rok4/admin/
* État de santé du serveur : http://localhost/rok4/healthcheck

Expand All @@ -190,7 +266,7 @@ Lorsque le serveur reçoit une requête, c'est le premier élément du chemin qu
* `/healthcheck` -> requête d'état de santé ou statut du serveur
* `/wmts` -> requête WMTS
* `/wms` -> requête WMS
* `/tiles` -> requête API Tiles
* `/ogcapi` -> requête OGC API
* `/tms` -> requête TMS
* `/admin` -> requête d'administration

Expand Down Expand Up @@ -241,8 +317,8 @@ Pour que les URLs présentes dans les réponses des services soient correctes ma
"tms": {
"endpoint_uri": "http://localhost/rok4/tms"
},
"tiles": {
"endpoint_uri": "http://localhost/rok4/tiles"
"ogcapi": {
"endpoint_uri": "http://localhost/rok4/ogcapi"
}
```

Expand Down
1 change: 1 addition & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@
#define DEFAULT_LOG_LEVEL boost::log::trivial::error
#define DEFAULT_NB_THREAD 1
#define DEFAULT_RESAMPLING "lanczos_2"
#define SECRET_HEADER_NAME "HTTP_X_ROK4_SECRET"


2 changes: 1 addition & 1 deletion config/layer.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
}
}
},
"tiles": {
"ogcapi": {
"type": "object",
"properties": {
"enabled": {
Expand Down
5 changes: 0 additions & 5 deletions config/server.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
"type": "integer",
"description": "Socket's backlog size"
},
"enabled": {
"type": "boolean",
"description": "Broadcast activation when all configuration is loaded",
"default": true
},
"logger": {
"type": "object",
"description": "Logger configuration",
Expand Down
132 changes: 66 additions & 66 deletions config/services.json
Original file line number Diff line number Diff line change
@@ -1,105 +1,105 @@
{
"provider": "Local",
"site": "http://localhost",
"fee": "none",
"access_constraint": "none",
"contact": {
"name": "SAV",
"position": "custodian",
"voice": "",
"facsimile": "",
"address_type": "",
"delivery_point": "",
"city": "",
"administrative_area": "",
"post_code": "",
"country": "",
"email": ""
"enabled": true,
"global": {
"provider": "Local",
"site": "http://localhost",
"fee": "none",
"access_constraint": "none",
"contact": {
"name": "SAV",
"position": "custodian",
"voice": "",
"facsimile": "",
"address_type": "",
"delivery_point": "",
"city": "",
"administrative_area": "",
"post_code": "",
"country": "",
"email": ""
},
"crs_equivalences": "/etc/rok4/equals_crs.json",
"default_style": "normal",
"inspire": true,
"map": {
"limits": {
"width": 10000,
"height": 10000,
"tile_x": 256,
"tile_y": 256,
"layers_count": 2
},
"formats": [
"image/jpeg",
"image/png",
"image/tiff",
"image/geotiff",
"image/x-bil;bits=32"
],
"crs": [
"CRS:84",
"EPSG:3857",
"EPSG:4326"
],
"reprojection": true
},
"tile": {
"reprojection": true
}
},
"crs_equivalences": "/etc/rok4/equals_crs.json",
"default_style": "normal",
"admin": {
"enabled": true
"enabled": true,
"secret": "password"
},
"health": {
"enabled": true
},
"common": {
"enabled": true,
"endpoint_uri": "http://localhost/rok4/common",
"root_path": "/common",
"title": "Service COMMON",
"abstract": "Ce service permet la découvertes des services assurés par ce serveur",
"keywords": [
"COMMON"
]
},
"wms": {
"enabled": true,
"endpoint_uri": "http://localhost/rok4/wms",
"root_path": "/wms",
"title": "Service de visualisation WMS",
"abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux WMS",
"keywords": [
"WMS"
],
"limits": {
"width": 10000,
"height": 10000,
"tile_x": 256,
"tile_y": 256,
"layers_count": 2
},
"name": "WMS",
"formats": [
"image/jpeg",
"image/png",
"image/tiff",
"image/geotiff",
"image/x-bil;bits=32"
],
"crs": [
"CRS:84",
"EPSG:3857",
"EPSG:4326"
],
"root_layer": {
"title": "Couches WMS",
"abstract": "Données servies en WMS"
},
"reprojection": true,
"inspire": false
"name": "WMS",
"title": "Service de visualisation WMS",
"abstract": "Ce service permet la visulation de couches de données raster au travers d'un flux WMS",
"keywords": [
"WMS"
]
},
"wmts": {
"enabled": true,
"endpoint_uri": "http://localhost/rok4/wmts",
"title": "Service de visualisation WMTS",
"abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux WMTS",
"abstract": "Ce service permet la visulation de couches de données raster au travers d'un flux WMTS",
"keywords": [
"WMTS"
],
"root_path": "/wmts",
"reprojection": true
"root_path": "/wmts"
},
"tms": {
"enabled": true,
"endpoint_uri": "http://localhost/rok4/tms",
"root_path": "/tms",
"title": "Service de visualisation TMS",
"abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux TMS",
"abstract": "Ce service permet la visulation de couches de données au travers d'un flux TMS",
"keywords": [
"TMS"
]
},
"tiles": {
"ogcapi": {
"enabled": true,
"endpoint_uri": "http://localhost/rok4/tiles",
"root_path": "/tiles",
"title": "Service de visualisation OGC API Tiles",
"abstract": "Ce service permet la visulation de couches de données raster IGN au travers d'un flux OGC API Tiles",
"endpoint_uri": "http://localhost/rok4/ogcapi",
"root_path": "/ogcapi",
"title": "Service de visualisation selon les API OGC",
"abstract": "Ce service permet la visulation de couches de données au travers de flux OGC API Tiles",
"keywords": [
"OGC API Tiles"
],
"reprojection": true
"tiles": true,
"maps": true,
"default_size": 256
}
}
Loading
Loading