@@ -576,8 +576,10 @@ const wrapResponseInFeatureCollection = function (features, links,
576576 return fc
577577}
578578
579- const buildPaginationLinks = function ( limit , parameters , bbox , intersects , collections , endpoint ,
580- httpMethod , sortby , items ) {
579+ const buildPaginationLinks = function (
580+ limit , parameters , bbox , intersects , collections , filter ,
581+ endpoint , httpMethod , sortby , items
582+ ) {
581583 if ( items . length ) {
582584 const dictToURI = ( dict ) => (
583585 Object . keys ( dict ) . map (
@@ -620,7 +622,9 @@ const buildPaginationLinks = function (limit, parameters, bbox, intersects, coll
620622 method : httpMethod ,
621623 type : 'application/geo+json'
622624 }
623- const nextParams = pickBy ( assign ( parameters , { bbox, intersects, limit, next, collections } ) )
625+ const nextParams = pickBy (
626+ assign ( parameters , { bbox, intersects, limit, next, collections, filter } )
627+ )
624628 if ( httpMethod === 'GET' ) {
625629 const nextQueryParameters = dictToURI ( nextParams )
626630 link . href = `${ endpoint } ?${ nextQueryParameters } `
@@ -655,8 +659,10 @@ const searchItems = async function (
655659
656660 const sortby = extractSortby ( parameters )
657661 const query = extractStacQuery ( parameters )
658- const filter = concatenateCql2Filters (
659- extractCql2Filter ( parameters ) ,
662+ const specifiedFilter = extractCql2Filter ( parameters )
663+
664+ const combinedFilter = concatenateCql2Filters (
665+ specifiedFilter ,
660666 extractRestrictionCql2Filter ( parameters , headers )
661667 )
662668 const fields = extractFields ( parameters )
@@ -674,7 +680,7 @@ const searchItems = async function (
674680 datetime,
675681 intersects : geometry ,
676682 query,
677- filter : filter ,
683+ filter : combinedFilter ,
678684 sortby,
679685 fields,
680686 ids,
@@ -730,6 +736,7 @@ const searchItems = async function (
730736 bbox ,
731737 intersects ,
732738 specifiedCollectionIds ,
739+ specifiedFilter ,
733740 newEndpoint ,
734741 httpMethod ,
735742 sortby ,
0 commit comments