Skip to content

Commit

Permalink
Add documentation of async map thumbnail update, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
jirik committed May 17, 2021
1 parent b612db7 commit 49e52b0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ make timgen-build
- Rename filesystem directory containing workspaces from `users` to `workspaces`
### Changes
- [#159](https://github.com/jirik/layman/issues/159) Object `layman_metadata` was added to [GET Workspace Layer](doc/rest.md#get-workspace-layer) and [PATCH Workspace Map](doc/rest.md#patch-workspace-map) responses. Attribute `layman_metadata.publication_status` can be used for watching global state of publication (updating, complete, incomplete).
- [#159](https://github.com/jirik/layman/issues/159) Bounding box is send explicitly to GeoServer for every layer.
- [#159](https://github.com/jirik/layman/issues/159) [WFS-T](doc/endpoints.md#web-feature-service) request causes update of bounding box and thumbnail of each edited layer in [asynchronous chain](doc/async-tasks.md). Documentation describes concurrency of WFS-T request and its asynchronous chains with another [WFS-T request](doc/endpoints.md#web-feature-service), [PATCH Workspace Layer](doc/rest.md#patch-workspace-layer), [DELETE Workspace Layer](doc/rest.md#delete-workspace-layer), and [DELETE Workspace Layers](doc/rest.md#delete-workspace-layers).
- [#331](https://github.com/jirik/layman/issues/331) Query parameter *full_text_filter* is also use for substring search in all endpoints with filtering.
- [#159](https://github.com/jirik/layman/issues/159) Bounding box is sent explicitly to GeoServer for every layer.
- [#159](https://github.com/jirik/layman/issues/159) [WFS-T](doc/endpoints.md#web-feature-service) or [PATCH Workspace Layer](doc/rest.md#patch-workspace-layer) request causes
- update of bounding box and thumbnail of each edited [layer](doc/models.md#layer)
- bounding box is updated in DB, QGIS file, WMS/WFS capabilities, and CSW metadata record
- thumbnail is updated in filesystem and it is accessible using [GET Workspace Layer Thumbnail](doc/rest.md#get-workspace-layer-thumbnail)
- update of thumbnail of each [map](doc/models.md#map) that points to at least one edited layer (thumbnail is updated in filesystem and accessible using [GET Workspace Map Thumbnail](doc/rest.md#get-workspace-map-thumbnail))
These updates run in [asynchronous chain](doc/async-tasks.md). Documentation describes concurrency of WFS-T request and its asynchronous chains with another [WFS-T request](doc/endpoints.md#web-feature-service), [POST Workspace Layers](doc/rest.md#post-workspace-layers), [PATCH Workspace Layer](doc/rest.md#patch-workspace-layer), [DELETE Workspace Layer](doc/rest.md#delete-workspace-layer), [DELETE Workspace Layers](doc/rest.md#delete-workspace-layers), [PATCH Workspace Map](doc/rest.md#patch-workspace-map), [DELETE Workspace Map](doc/rest.md#delete-workspace-map), and [DELETE Workspace Maps](doc/rest.md#delete-workspace-maps).
- [#331](https://github.com/jirik/layman/issues/331) Query parameter *full_text_filter* is also used for substring search in all endpoints with filtering.
- Filesystem directory containing workspaces was renamed from `users` to `workspaces`
- [#72](https://github.com/jirik/layman/issues/72) Pipenv upgraded to v2020.11.15

Expand Down
3 changes: 3 additions & 0 deletions doc/async-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ Layman uses asynchronous tasks for processing publications (layers and maps), be
Asynchronous tasks are started by following requests:
- [POST Workspace Layers](rest.md#post-workspace-layers)
- tasks related to newly published layer
- tasks related to each map that points to newly published layer
- [PATCH Workspace Layer](rest.md#patch-workspace-layer)
- tasks related to patched layer
- tasks related to each map that points to patched layer
- [POST Workspace Maps](rest.md#post-workspace-maps)
- tasks related to newly published map
- [PATCH Workspace Map](rest.md#patch-workspace-map)
- tasks related to patched map
- [WFS-T](endpoints.md#web-feature-service)
- tasks related to each edited layer
- tasks related to each map that points to at least one edited layer

Each request starts series of asynchronous tasks called **chain**.
3 changes: 2 additions & 1 deletion doc/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ The authentication proxy behaves in the same way as in case of [WMS](#web-map-se
The WFS proxy parses request and adapts it in few ways in case of WFS-T 1.0, 1.1 and 2.0:
- If incoming WFS-T request Insert, Replace, or Update refers to an attribute, that does not exist yet in DB, the attribute is automatically created in DB table before redirecting WFS-T request to GeoServer. Data type of the attributes is `VARCHAR(1024)`. Also if QML style is used, attribute is automatically added to QGS project file. If attribute creation fails for any reason, warning is logged and request is forwarded to GeoServer nevertheless.
- Bounding box and thumbnail of each layer referenced in incoming Insert, Replace, Update, or Delete WFS-T request is updated in [asynchronous chain](async-tasks.md) after the request is finished.
- Calling WFS-T on a layer when previous asynchronous chain (POST, PATCH or another WFS-T) is still running causes run of WFS-T asynchronous chain after the current one is finished.
- Calling WFS-T on a layer when previous asynchronous chain of the layer (POST, PATCH or another WFS-T) is still running causes run of WFS-T asynchronous chain after the current one is finished.
- Calling WFS-T on a layer that is contained by map whose previous asynchronous chain (POST, PATCH or another WFS-T) is still running causes run of map's WFS-T asynchronous chain after the current one is finished.

WFS respects [publication access rights](security.md#publication-access-rights). If user asks for type (layer) he has not read access to by DescribeFeatureType or GetFeature request, GeoServer returns standard ExceptionReport (code InvalidParameterValue, locator typeName or typeNames). To perform WFS-T requests, write access is needed.

Expand Down
6 changes: 5 additions & 1 deletion doc/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,18 @@ Publish vector data file as new layer of WMS and WFS.

Processing chain consists of few steps:
- save file to workspace directory within Layman data directory
- save basic information (name, title, access_rights) into PostgreSQL
- import the file to PostgreSQL database as new table into workspace schema, including geometry transformation to EPSG:3857
- publish the table as new layer (feature type) within appropriate WFS workspaces of GeoServer
- save bounding box into PostgreSQL
- for layers with SLD or none style:
- publish the table as new layer (feature type) within appropriate WMS workspaces of GeoServer
- else for layers with QML style:
- create QGS file on QGIS server filesystem with appropriate style
- publish the layer on GeoServer through WMS cascade from QGIS server
- generate thumbnail image
- publish metadata record to Micka (it's public if and only if read access is set to EVERYONE)
- save basic information (name, title, access_rights) into PostgreSQL
- update thumbnail of each [map](models.md#map) that points to this layer.

If workspace directory, database schema, GeoServer's workspaces, or GeoServer's datastores does not exist yet, it is created on demand.

Expand Down Expand Up @@ -543,6 +545,8 @@ Update information about existing map. First, it deletes sources of the map, and

Calling concurrent PATCH requests is not supported, as well as calling PATCH when [POST/PATCH async chain](async-tasks.md) is still running, is not allowed. In such cases, error is returned.

Calling PATCH request when [WFS-T async chain](async-tasks.md) is still running causes abortion of WFS-T async chain and ensures another run of WFS-T async chain after PATCH async chain is finished.

#### Request
Content-Type: `multipart/form-data`, `application/x-www-form-urlencoded`

Expand Down

0 comments on commit 49e52b0

Please sign in to comment.