OGC data and map services
Read project features through OGC API Features and use WMS map layers.
Last updated:
On this page
AccessOGC API FeaturesWMS 1.3.0Read the collection listFilter collection featuresRetrieve a WMS mapAccess
OGC services under /api/ogc are read-only. Supply an access key in Authorization: Bearer or the HTTP Basic password field; the Basic username is arbitrary. Session cookies are not accepted. Key project scope and current user organisation/membership permissions apply. Design branches are not published through these services.
GIS_OGC=kapali disables the services. Query-string keys are disabled by default; the anahtar parameter is accepted only when GIS_OGC_SORGU_ANAHTAR=1. Use headers or a saved Basic authentication profile because URLs may also be recorded by other systems.
OGC API Features
| Method and endpoint | Function |
|---|---|
GET /api/ogc/ |
Service landing document |
GET /api/ogc/conformance |
Server-advertised conformance classes; authentication not required |
GET /api/ogc/api |
OpenAPI 3.0 schema for OGC endpoints |
GET /api/ogc/collections |
Accessible collections |
GET /api/ogc/collections/{cid} |
Collection, extent and coordinate systems |
GET /api/ogc/collections/{cid}/items |
GeoJSON features |
GET /api/ogc/collections/{cid}/items/{fid} |
One GeoJSON feature |
Collection identifiers use p{proje_id}-{tur}, such as p123-cable. Obtain actual identifiers from the collection list. All OGC endpoints except conformance require a key.
- Read the collection list and select an authorised collection.
- Retrieve features through its
itemslink. - Follow
rel: "next"in returnedlinks; if absent, you are on the final page. - Add
bbox,bbox-crs,crsanddatetimefilters as needed.
limit is the page size and after the last feature identifier. datetime filters record update times; it accepts a zoned instant or start/end interval, with .. for an open end. HTML output is not provided.
Use standard coordinate-system URIs from the collection's crs list. Default CRS84 uses longitude/latitude order. The EPSG:4326 URI uses latitude/longitude order for output and bounding boxes. Read the response's Content-Crs header. A project-specific local transformation is not an OGC coordinate system.
WMS 1.3.0
The WMS endpoint is /api/ogc/wms, using the same authentication and project scope.
| Request | Output |
|---|---|
SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities |
XML describing authorised layers and service details |
REQUEST=GetMap |
Map image with FORMAT=image/png |
REQUEST=GetFeatureInfo |
Features near the selected pixel with INFO_FORMAT=application/json |
GetMap also requires SERVICE, VERSION, LAYERS, CRS, BBOX, WIDTH and HEIGHT. Only the default style is used; STYLES may be empty. Supported systems are EPSG:4326, EPSG:3857 and CRS:84. In WMS 1.3.0, EPSG:4326 bounding boxes use latitude, longitude order.
GetFeatureInfo requires QUERY_LAYERS, I, J and INFO_FORMAT in addition to the same map parameters. Queried layers must be a subset of LAYERS. WMS parameter/layer errors may return XML; authentication errors may return JSON with detail, kod and alan.
In a desktop GIS client, append /api/ogc/ to the server URL for OGC API Features or /api/ogc/wms for WMS. Use the access key as the password in the Basic authentication profile. Connecting a client does not grant access to every organisation project.
Read the collection list
In these examples, SOSOMAPS_URL is your organisation's application URL. Request/response fields have been checked against source; these examples do not demonstrate a live service connection or desktop-client acceptance. Obtain a read-scoped key from secure environment configuration.
curl --fail-with-body "$SOSOMAPS_URL/api/ogc/collections" \
-H "Authorization: Bearer $ERISIM_ANAHTARI"
import os
import requests
yanit = requests.get(
os.environ["SOSOMAPS_URL"].rstrip("/") + "/api/ogc/collections",
headers={"Authorization": "Bearer " + os.environ["ERISIM_ANAHTARI"]},
timeout=30,
)
yanit.raise_for_status()
print(yanit.json())
const yanit = await fetch(
`${process.env.SOSOMAPS_URL.replace(/\/$/, '')}/api/ogc/collections`,
{ headers: { Authorization: `Bearer ${process.env.ERISIM_ANAHTARI}` } }
);
if (!yanit.ok) throw new Error(`HTTP ${yanit.status}`);
console.log(await yanit.json());
Read collections and each collection's id, links, extent and crs. collections: [] means no collections are accessible; it does not mean all organisation data is empty. Follow the feature link in links.
Filter collection features
Collection p123-cabinet and the coordinates are examples; use an actual identifier from the collection list. Default CRS84 uses longitude/latitude order. --get --data-urlencode correctly encodes parameters in the URL.
curl --fail-with-body --get \
"$SOSOMAPS_URL/api/ogc/collections/p123-cabinet/items" \
-H "Authorization: Bearer $ERISIM_ANAHTARI" \
--data-urlencode 'bbox=31.9,38.9,32.1,39.1' \
--data-urlencode 'limit=100'
import os
import requests
yanit = requests.get(
os.environ["SOSOMAPS_URL"].rstrip("/") + "/api/ogc/collections/p123-cabinet/items",
headers={"Authorization": "Bearer " + os.environ["ERISIM_ANAHTARI"]},
params={"bbox": "31.9,38.9,32.1,39.1", "limit": 100}, timeout=30,
)
yanit.raise_for_status()
print(yanit.json())
const adres = new URL('/api/ogc/collections/p123-cabinet/items', process.env.SOSOMAPS_URL);
adres.search = new URLSearchParams({ bbox: '31.9,38.9,32.1,39.1', limit: '100' });
const yanit = await fetch(adres, {
headers: { Authorization: `Bearer ${process.env.ERISIM_ANAHTARI}` }
});
if (!yanit.ok) throw new Error(`HTTP ${yanit.status}`);
console.log(await yanit.json());
An example empty-page response follows. numberReturned counts records on this page, not all records. If another page exists, links contains rel: "next".
{
"type": "FeatureCollection",
"features": [],
"numberReturned": 0,
"timeStamp": "2026-11-10T09:00:00+00:00",
"links": [
{
"href": "/api/ogc/collections/p123-cabinet/items?bbox=31.9%2C38.9%2C32.1%2C39.1&limit=100",
"rel": "self",
"type": "application/geo+json"
}
]
}
Retrieve a WMS map
First read authorised layers with GetCapabilities. For Basic authentication, the username is arbitrary and the password is the access key. The example username okuyucu does not create a product account.
curl --fail-with-body --get "$SOSOMAPS_URL/api/ogc/wms" \
--user "okuyucu:$ERISIM_ANAHTARI" \
--data-urlencode 'SERVICE=WMS' \
--data-urlencode 'VERSION=1.3.0' \
--data-urlencode 'REQUEST=GetCapabilities'
Take the layer name from the response's Name. This example selects CRS:84, uses a longitude/latitude bounding box and writes the PNG to a local file. Selecting EPSG:4326 changes the box axis order.
curl --fail-with-body --get "$SOSOMAPS_URL/api/ogc/wms" \
-H "Authorization: Bearer $ERISIM_ANAHTARI" \
--data-urlencode 'SERVICE=WMS' --data-urlencode 'VERSION=1.3.0' \
--data-urlencode 'REQUEST=GetMap' --data-urlencode 'LAYERS=p123-cabinet' \
--data-urlencode 'STYLES=' --data-urlencode 'CRS=CRS:84' \
--data-urlencode 'BBOX=31.9,38.9,32.1,39.1' \
--data-urlencode 'WIDTH=800' --data-urlencode 'HEIGHT=600' \
--data-urlencode 'FORMAT=image/png' --output harita.png
import os
from pathlib import Path
import requests
params = {"SERVICE": "WMS", "VERSION": "1.3.0", "REQUEST": "GetMap",
"LAYERS": "p123-cabinet", "STYLES": "", "CRS": "CRS:84",
"BBOX": "31.9,38.9,32.1,39.1", "WIDTH": 800, "HEIGHT": 600,
"FORMAT": "image/png"}
yanit = requests.get(os.environ["SOSOMAPS_URL"].rstrip("/") + "/api/ogc/wms",
headers={"Authorization": "Bearer " + os.environ["ERISIM_ANAHTARI"]},
params=params, timeout=30)
yanit.raise_for_status()
if not yanit.headers.get("Content-Type", "").startswith("image/png"):
raise ValueError("Expected a PNG response")
Path("harita.png").write_bytes(yanit.content)
import { writeFile } from 'node:fs/promises';
const adres = new URL('/api/ogc/wms', process.env.SOSOMAPS_URL);
adres.search = new URLSearchParams({
SERVICE: 'WMS', VERSION: '1.3.0', REQUEST: 'GetMap',
LAYERS: 'p123-cabinet', STYLES: '', CRS: 'CRS:84',
BBOX: '31.9,38.9,32.1,39.1', WIDTH: '800', HEIGHT: '600', FORMAT: 'image/png'
});
const yanit = await fetch(adres, {
headers: { Authorization: `Bearer ${process.env.ERISIM_ANAHTARI}` }
});
if (!yanit.ok) throw new Error(`HTTP ${yanit.status}`);
if (!yanit.headers.get('content-type')?.startsWith('image/png')) {
throw new Error('Expected a PNG response');
}
await writeFile('harita.png', Buffer.from(await yanit.arrayBuffer()));
Check the downloaded file's type and any WMS error body. The OGC reference is on its API page; the shared error envelope is explained in Error codes.