Docs / Developers / Reading features

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=50 lists visible layers, newest change first. Use limit and offset to 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.
FieldMeaning
title, description, itemTypeDataset and layer description; type is point, line, polygon or table.
extent.spatial.bboxExtent in WGS 84 longitude/latitude.
crs, storageCrsAvailable output coordinate systems and the storage system.
featureCount, updatedRow count and time of the last data change.
orbgisDataset itemId, layerIndex, detailMinZoom, editable and optional temporalField.
linksFeature, 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}.

ParameterUse
limitFeatures per page: default 100, maximum 1 000.
bboxwest,south,east,north; returns features whose geometry intersects the box. WGS 84 unless bbox-crs is supplied.
bbox-crsCoordinate system of the bounding box.
crsOutput coordinate system, confirmed by the Content-Crs response header.
propertiesComma-separated columns to return. objectid is always included.
afterContinue after this objectid; prefer the response’s next link.
counttrue adds numberMatched. Omit it in paging loops to avoid repeated counts.
datetimeInstant or interval applied to orbgis.temporalField; 400 if the layer has no temporal field.
filterCQL2 text expression, combined with bbox and datetime using AND.
filter-lang, filter-crsOnly 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.

Heads up

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; IN and NOT IN with up to 500 values.
  • LIKE with % at either end of a pattern. Use ILIKE or CASEI() for case-insensitive matching. _ and % inside a pattern are unsupported.
  • AND, OR, NOT and parentheses; date literals such as DATE('2026-01-01') and TIMESTAMP('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=20 searches content. It requires authentication. GET /v1/items/{id} reads one item, including its collections ids; 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.