-
Notifications
You must be signed in to change notification settings - Fork 66
STAC API
Marten edited this page Jul 2, 2025
·
1 revision
Geoportal Server implements the STAC API v 1.0.0 specification, along with the Transaction Extension.
Supporting the STAC API was decided as:
- It fits well with the use case of Geoportal Server as a searchable catalog of content supporting discovery and access to geospatial assets.
- It is a well-documented and its extensions are closely related the Open Geospatial Consortium (OGC) API specifications.
- It is a simple API.
- The underlying data model for items and collections is based on GeoJSON, another well-established geospatial standard.
- The data model for items is flexible and can be extended for a specific use case.
the API supports searching for items via the /stac/search endpoint. This endpoint supports both HTTP GET and POST operations.
HTTP POST: https://geoportalserver/geoportal/stac/search
{
"limit": 10,
"collections": [
"ExampleCollection"
],
"filter": "stac_property1=value1 AND stac_property2=value2"
}
Note that in the above HTTP POST example, there is also a limit on the number of items returned (10), and a limit of the scope of search to the ExampleCollection collection.
HTTP GET:
https://geoportalserver/geoportal/stac/search?filter=stac_property1=value1 AND stac_property2=value2&outCRS=EPSG:3857
Another larger HTTP POST search body is given below.
{
"bbox": [
-66.6459,
49.354,
-63.4856,
51.2101
],
"datetime": "2025-07-14T00:00:00Z/2025-07-18T23:59:59Z",
"intersects": {
"type": "Polygon",
"coordinates": [
[
[-67.18661657269904,48.297014795971684],
[-67.1872,48.2971],
[-67.17322376288064,48.33374073671041],
[-67.1590065133506,48.371013322480614],
[-66.6453207034186,49.7177153248036],
[-66.63275537806288,49.750657151284344],
[-66.6171,49.7917],
[-66.61637825143734,49.79159448137363],
[-64.1246,49.4273],
[-64.14045802174776,49.39048646945745],
[-64.74832861700386,47.979348114350955],
[-64.7639,47.9432],
[-67.18661657269904,48.297014795971684]
]
]
},
"ids": [
"id1",
"id2"
],
"limit": 10,
"collections": [
"ExampleCollection",
"AnotherExampleCollection"
],
"outCRS": "EPSG:3857"
}
All fields are optional. If no filters are provided, the endpoint returns up to limit
items from all collections.
Field | Type | Description | Constraints |
---|---|---|---|
collections |
array of strings | List of collection IDs to restrict the search. | If provided, each returned Item must belong to one of these collections. |
bbox |
array of numbers | Bounding box filter: [minX, minY, maxX, maxY] . |
intersects |
datetime |
string | Temporal filter on properties['datetime'] : equality or range ('start/end' ). |
Use RFC 3339 timestamps. To specify a range, separate start and end by / . Us .. for open ranges (e.g. '../2025-07-18' ). |
ids |
array of strings | List of specific Item IDs to return. | Returned items must have an id in this list. |
status |
string | Filter on properties['gsdb:status'] . |
Allowed values: 'active' , 'inactive' . Case-sensitive. |
limit |
integer | Maximum number of items to return. Default: 10 . |
Must be a non-negative integer. |
offset |
integer | Number of items to skip before returning results (for pagination). Default: 0 . |
Must be a non-negative integer. |
outCRS |
string | If provided, returned Item geometries will be transformed from their native CRS to this output CRS. | Only valid when exactly one collection is specified (via collections list or collection_id ). Throws 400 otherwise. Only applied when |