Skip to main content

OGC services

Every table with a geometry column is automatically exposed as a layer through the Open Geospatial Consortium (OGC) standards WMS (Web Map Service) and WFS (Web Feature Service). This means you can view and edit your data directly in desktop GIS clients like QGIS, or render maps in web applications with OpenLayers, Leaflet or MapLibre — no extra configuration needed.

  • WMS renders your data as map images (PNG/JPEG) on the server, styled with the classes, styles and labels you have configured.
  • WFS serves the actual vector features (geometries and attributes) and supports transactions (WFS-T), so features can be inserted, updated and deleted through the standard.

Endpoints

Each service has a single endpoint, qualified by schema and database:

https://api.centia.io/api/v4/ows/schema/{schema}/database/{database}
https://api.centia.io/api/v4/wfs/schema/{schema}/database/{database}

The /ows endpoint is a combined read-only endpoint serving WMS, WFS and UTFGRID requests. The /wfs endpoint additionally accepts XML-encoded POST requests for GetFeature and WFS-T transactions.

The WFS endpoint accepts an optional srs path segment to reproject the output to a specific EPSG code, and an optional ts segment (ISO date) for versioned layers:

https://api.centia.io/api/v4/wfs/schema/{schema}/database/{database}/srs/{srs}

Authentication

The same endpoint serves all clients — how you authenticate decides what you can access:

  • Bearer token: Send an Authorization: Bearer header. The token must belong to {database} in the path — an invalid or foreign token is rejected with 401 and an OGC service exception, never silently downgraded to anonymous access.
  • Anonymous: Publicly readable layers are served without any credentials.
  • HTTP Basic: Requests for protected layers without a bearer token are challenged with 401 Basic auth — enter a sub-user's name and password (this is how desktop GIS clients like QGIS authenticate).
note

Which layers a service exposes — and whether they can be read or written — follows the privileges of the authenticated user, including privileges inherited through groups. WFS-T transactions always require credentials with write privilege on the table.

WMS

WMS renders map images on the server. Versions 1.1.0 and 1.3.0 are supported (with 1.3.0, use the CRS parameter instead of SRS). Start with GetCapabilities to see the available layers — the schema's bounding box in the capabilities document comes from the extent set with the Map API:

GetCapabilities
GET https://api.centia.io/api/v4/ows/schema/rockhall/database/mydb?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetCapabilities HTTP/1.1
Authorization: Bearer abc123

Request a rendered map image with GetMap. Layers are named schema.table:

GetMap
GET https://api.centia.io/api/v4/ows/schema/rockhall/database/mydb?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&LAYERS=rockhall.venues&STYLES=&SRS=EPSG:3857&BBOX=1204164,7485240,1259200,7534200&WIDTH=1024&HEIGHT=768&FORMAT=image/png&TRANSPARENT=true HTTP/1.1
Authorization: Bearer abc123

The rendering — colors, symbols, scale visibility and labels — is controlled through the Layer API.

WFS

WFS versions 1.0.0 and 1.1.0 are supported with the operations GetCapabilities, DescribeFeatureType and GetFeature.

GetCapabilities
GET https://api.centia.io/api/v4/wfs/schema/rockhall/database/mydb?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetCapabilities HTTP/1.1
Authorization: Bearer abc123
GetFeature
GET https://api.centia.io/api/v4/wfs/schema/rockhall/database/mydb?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=venues&MAXFEATURES=100&SRSNAME=EPSG:4326 HTTP/1.1
Authorization: Bearer abc123

GetFeature supports the query parameters TYPENAME (comma-separated table names), BBOX (minx,miny,maxx,maxy), FILTER (OGC Filter Encoding XML), SRSNAME, MAXFEATURES and OUTPUTFORMAT.

Transactions (WFS-T)

XML-encoded GetFeature and Transaction requests are sent with POST to the WFS endpoint. Transactions require write privilege on the table:

Insert a feature
POST https://api.centia.io/api/v4/wfs/schema/rockhall/database/mydb HTTP/1.1
Content-Type: application/xml
Authorization: Bearer abc123

<wfs:Transaction version="1.1.0" service="WFS"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:rockhall="http://api.centia.io">
<wfs:Insert>
<rockhall:venues>
<rockhall:name>Whisky a Go Go</rockhall:name>
<rockhall:the_geom>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-118.331,34.090</gml:coordinates>
</gml:Point>
</rockhall:the_geom>
</rockhall:venues>
</wfs:Insert>
</wfs:Transaction>

Connecting from QGIS

Add a WMS or WFS connection in QGIS with the same endpoints:

  1. In QGIS, choose Layer → Add Layer → Add WMS/WMTS Layer… (or Add WFS Layer…).
  2. Create a new connection with the URL https://api.centia.io/api/v4/ows/schema/{schema}/database/{database} (WMS) or https://api.centia.io/api/v4/wfs/schema/{schema}/database/{database} (WFS).
  3. If the layers are not publicly readable, enter a sub-user's name and password as Basic authentication.
  4. Connect and add the layers to your project.