Reading features
Feature layers are OGC API – Features collections. Read GeoJSON, choose a coordinate system, filter the results and follow links to the next page.
Find a collection#
GET /v1/links to collections, conformance and the API reference.GET /v1/collections?limit=50lists visible layers, newest change first. Uselimitandoffsetto page through collections; the maximum page size is 200.GET /v1/collections/{id}returns one layer’s metadata. The collection id is the layer UUID shown on the dataset page.
| Field | Meaning |
|---|---|
title, description, itemType | Dataset and layer description; type is point, line, polygon or table. |
extent.spatial.bbox | Extent in WGS 84 longitude/latitude. |
crs, storageCrs | Available output coordinate systems and the storage system. |
featureCount, updated | Row count and time of the last data change. |
orbgis | Dataset itemId, layerIndex, detailMinZoom, editable and optional temporalField. |
links | Feature, tile, queryables and portal URLs. |
Read features#
GET /v1/collections/{id}/items returns a GeoJSON FeatureCollection. Feature ids are objectid integers. The response includes numberReturned, timeStamp and links. Read one feature at /v1/collections/{id}/items/{objectid}.
| Parameter | Use |
|---|---|
limit | Features per page: default 100, maximum 1 000. |
bbox | west,south,east,north; returns features whose geometry intersects the box. WGS 84 unless bbox-crs is supplied. |
bbox-crs | Coordinate system of the bounding box. |
crs | Output coordinate system, confirmed by the Content-Crs response header. |
properties | Comma-separated columns to return. objectid is always included. |
after | Continue after this objectid; prefer the response’s next link. |
count | true adds numberMatched. Omit it in paging loops to avoid repeated counts. |
datetime | Instant or interval applied to orbgis.temporalField; 400 if the layer has no temporal field. |
filter | CQL2 text expression, combined with bbox and datetime using AND. |
filter-lang, filter-crs | Only cql2-text is supported. filter-crs sets the coordinate system of a filter’s BBOX. |
Coordinate systems#
Use a system from the collection’s crs list: CRS84 (longitude/latitude), the storage system, or EPSG 3857, 3006 (SWEREF 99 TM), 3035, 3067, 25832 or 25833. Supply the OGC URI, for example http://www.opengis.net/def/crs/EPSG/0/3006. Unsupported systems return 400 unsupported_crs. See Coordinate systems.
Paging and large reads#
Follow the next link in the body or Link header until it is absent. Feature pages use an objectid cursor rather than an offset. Pages are not a snapshot: features can change while you read. Fetch pages sequentially to stay within the concurrency limit.
A query has an 8 second database budget (504 query_timeout) and a 20 MB response cap (413 response_too_large). Narrow bbox, reduce limit or request fewer properties. Use an export for a whole large layer.
Filtering with CQL2#
GET /v1/collections/{id}/queryables lists the fields and types you can filter. Supported expressions include:
- Comparisons
=,<>,<,>,<=,>=;IS NULL,IS NOT NULL;INandNOT INwith up to 500 values. LIKEwith%at either end of a pattern. UseILIKEorCASEI()for case-insensitive matching._and%inside a pattern are unsupported.AND,OR,NOTand parentheses; date literals such asDATE('2026-01-01')andTIMESTAMP('2026-01-01T00:00:00Z').S_INTERSECTS(geometry, BBOX(west, south, east, north)).
For a collection with species and height_m columns, URL-encode the filter with curl:
curl --fail-with-body --get \
-H "Authorization: Bearer $ORBGIS_API_KEY" \
--data-urlencode "filter=species = 'Tilia' AND height_m >= 10" \
"https://api.orbgis.se/v1/collections/COLLECTION_ID/items"Replace COLLECTION_ID with a layer UUID and choose fields from its queryables. Filters are limited to 8 192 characters, depth 12 and 50 clauses per AND/OR group. Unsupported expressions return 400 unsupported_filter; malformed expressions, unknown fields and wrong value types return 400 invalid_filter.
Content and maps#
GET /v1/items?q=roads&type=feature_service&pageSize=20searches content. It requires authentication.GET /v1/items/{id}reads one item, including itscollectionsids; published items also allow anonymous reads.GET /v1/maps/{id}returns a map’s coordinate system, initial view, basemap and layer settings. Maps are read-only through the API.
Collection metadata, features, queryables and tiles exposed by a published app can be read without a key. Anonymous API reads are cached for 60 seconds.