Skip to content

Latest commit

 

History

History
87 lines (78 loc) · 5.12 KB

models.md

File metadata and controls

87 lines (78 loc) · 5.12 KB

Models

Publication

  • Publication is any geospatial data that can be published by Layman through REST API.
  • Currently available publications are map and layer.
  • Each publication is placed in one workspace.

Layer

  • Layer is publication created from combination of vector data (GeoJSON or ShapeFile) and visualization (SLD or SE style)
  • Published layer can be accessed by standardized OGC interfaces
  • Thumbnail image available
  • Layer-related data is named and structured
    • either by workspace name and layername
      • REST API: /rest/workspaces/<workspace_name>/layers/<layername>
      • filesystem: /path/to/LAYMAN_DATA_DIR/users/<workspace_name>/layers/<layername>
      • PostgreSQL: db=LAYMAN_PG_DBNAME, schema=<workspace_name>, table=<layername>
      • GeoServer WFS: /geoserver/<workspace_name>/ows, layer=<layername>
      • GeoServer WMS: /geoserver/<workspace_name>_wms/ows, layer=<layername>, style=<layername>
    • or by UUID:
      • Micka: /record/basic/m-<uuid>
  • Simple rules
    • one DB table per input file
    • one WFS feature type per DB table
    • one WMS layer per DB table
    • one SLD or QGIS style per WMS layer
    • one thumbnail per WMS layer
    • one metadata record per WMS&WFS layer

Map

  • Also referred to as map composition
  • Map is publication defined by JSON valid against map-composition schema (source) used by Hslayers-ng
  • Map is collection of WMS layers and vector data
  • Maps composed from WMS layers only are fully supported
  • Documented map publishing process
  • Thumbnail image available
  • Map-related data is named and structured
    • either by workspace and layername
      • REST API: /rest/workspaces/<workspace_name>/maps/<mapname>
      • file system: /path/to/LAYMAN_DATA_DIR/users/<workspace_name>/maps/<mapname>
    • or by UUID:
      • Micka: /record/basic/m-<uuid>
  • Simple rules
    • one map file per map
    • one thumbnail per map
    • one metadata record per map

User

  • User is any person who communicates with Layman REST API through any client.
  • User can be either authenticated, or unauthenticated (i.e. anonymous).
  • User is sometimes identified by username

Username

  • Username is a string identifying one user, so it is unique among all users.
  • The string is lower-case (in contrast with role name).
  • Each user is represented by max. one username.
  • Username is also used to identify user's personal workspace when communicating with Layman REST API.
  • Username can be reserved by PATCH Current User.
  • Anonymous user has no username.

Role

  • Role is any group of users. One user can be assigned to multiple roles.
  • Each role is identified by name that is unique among all roles.
  • The name is upper-case (in contrast with username).
  • Roles can be used for assigning access rights.

Workspace

  • Workspace is folder for publications.
  • Each workspace is identified by name that is unique among all workspaces.
  • Workspace name is sometimes used for structuring publication-related data. For example, it's part of REST API URL (/rest/workspaces/<workspace_name>/...), directory names (<LAYMAN_DATA_DIR>/users/<workspace_name>/...), DB schemas, or OGC Web Services (/geoserver/<workspace_name>/..., /geoserver/<workspace_name>_wms/...).
  • Workspace's REST API consists of all map and layer endpoints endpoints.
  • There are following types of workspaces:

Personal workspace

  • Personal workspace is a workspace whose name is equal to username of some user.
  • Such user is considered as owner of this workspace and he is the only one who can publish new publications in this workspace.
  • Personal workspace is created automatically when username is reserved.

Public workspace