Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,19 @@ default <D extends StacCollectionModel> Collection getCollection(D m, Filter fil
.ifPresent(input -> {
// filter have values if user CQL contains BBox, hence our centroid point needs to be
// the noland geometry intersect with BBox and centroid point will be within the BBox
Geometry g = filter != null ? ((PreparedGeometry) filter.accept(visitor, input)).getGeometry() : input.getGeometry();
Geometry g;
if(filter != null) {
Object geo = filter.accept(visitor, input);
if (geo instanceof PreparedGeometry) {
g = ((PreparedGeometry) geo).getGeometry();
}
else {
g = (Geometry) geo;
}
}
else {
g = input.getGeometry();
}
collection.getProperties().put(
CollectionProperty.centroid,
createCentroid(g)
Expand Down
Loading