Tag: 6.2.1
The STAC API specification for the Fields extension states that (point 6 here):
If the same field is present in both include and exclude, it should be included.
On the contrary, performing a POST /search request to an instance of the stac-fastapi-pgstac API with the following payload
{
"fields": {
"exclude": ["properties.datetime"],
"include": ["properties.datetime"]
}
}
results in a FeatureCollection in which each Feature only have the fields id, collection and links.
Digging into the code, I can see this behavior is probably due to the logic in the filter_fields function of stac_fastapi/pgstac/utils.py, in which the exclude and include operations are applied sequentially and in this order.
Tag: 6.2.1
The STAC API specification for the Fields extension states that (point 6 here):
On the contrary, performing a
POST /searchrequest to an instance of thestac-fastapi-pgstacAPI with the following payloadresults in a
FeatureCollectionin which eachFeatureonly have the fieldsid,collectionandlinks.Digging into the code, I can see this behavior is probably due to the logic in the
filter_fieldsfunction ofstac_fastapi/pgstac/utils.py, in which theexcludeandincludeoperations are applied sequentially and in this order.