Skip to content
Merged
Show file tree
Hide file tree
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 @@ -23,7 +23,7 @@ public abstract class StacToCollections implements Converter<ElasticSearch.Searc
@Override
public Collections convert(ElasticSearch.SearchResult<StacCollectionModel> model, Filter filter) {

List<Collection> collections = model.getCollections().stream()
List<Collection> collections = model.getCollections().parallelStream()
.map(m -> getCollection(m, filter, hostname))
.collect(Collectors.toList());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public FeatureCollectionGeoJSON convert(ElasticSearch.SearchResult<StacItemModel
FeatureCollectionGeoJSON f = new FeatureCollectionGeoJSON();
f.setType(FeatureCollectionGeoJSON.TypeEnum.FEATURECOLLECTION);

List<FeatureGeoJSON> features = model.getCollections().stream()
List<FeatureGeoJSON> features = model.getCollections().parallelStream()
.map(i -> {
FeatureGeoJSON feature = new FeatureGeoJSON();
feature.setType(FeatureGeoJSON.TypeEnum.FEATURE);
Expand All @@ -34,7 +34,7 @@ public FeatureCollectionGeoJSON convert(ElasticSearch.SearchResult<StacItemModel
.map(item -> (BigDecimal)item)
.toList();

feature.setGeometry(new PointGeoJSON().coordinates(c));
feature.setGeometry(new PointGeoJSON().type(PointGeoJSON.TypeEnum.POINT).coordinates(c));
}
}
feature.setProperties(i.getProperties());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ public void verifyAggregationFeatureSummaryCorrect() throws IOException {
// Sample1
FeatureGeoJSON featureGeoJSON1 = new FeatureGeoJSON();
featureGeoJSON1.setType(FeatureGeoJSON.TypeEnum.FEATURE);
featureGeoJSON1.setGeometry(new PointGeoJSON().coordinates(List.of(BigDecimal.valueOf(159.26), BigDecimal.valueOf(-24.72))));
featureGeoJSON1.setGeometry(new PointGeoJSON()
.type(PointGeoJSON.TypeEnum.POINT)
.coordinates(List.of(BigDecimal.valueOf(159.26), BigDecimal.valueOf(-24.72)))
);
featureGeoJSON1.setProperties(Map.of(
FeatureProperty.COUNT.getValue(), 42.0,
FeatureProperty.START_TIME.getValue(), "2023-02-01T00:00:00.000Z",
Expand All @@ -479,7 +482,10 @@ public void verifyAggregationFeatureSummaryCorrect() throws IOException {
// Sample3
FeatureGeoJSON featureGeoJSON2 = new FeatureGeoJSON();
featureGeoJSON2.setType(FeatureGeoJSON.TypeEnum.FEATURE);
featureGeoJSON2.setGeometry(new PointGeoJSON().coordinates(List.of(BigDecimal.valueOf(154.81), BigDecimal.valueOf(-26.2))));
featureGeoJSON2.setGeometry(new PointGeoJSON()
.type(PointGeoJSON.TypeEnum.POINT)
.coordinates(List.of(BigDecimal.valueOf(154.81), BigDecimal.valueOf(-26.2)))
);
featureGeoJSON2.setProperties(Map.of(
FeatureProperty.COUNT.getValue(), 48.0,
FeatureProperty.START_TIME.getValue(), "2023-02-01T00:00:00.000Z",
Expand All @@ -490,7 +496,10 @@ public void verifyAggregationFeatureSummaryCorrect() throws IOException {

FeatureGeoJSON featureGeoJSON3 = new FeatureGeoJSON();
featureGeoJSON3.setType(FeatureGeoJSON.TypeEnum.FEATURE);
featureGeoJSON3.setGeometry(new PointGeoJSON().coordinates(List.of(BigDecimal.valueOf(153.56), BigDecimal.valueOf(-26.59))));
featureGeoJSON3.setGeometry(new PointGeoJSON()
.type(PointGeoJSON.TypeEnum.POINT)
.coordinates(List.of(BigDecimal.valueOf(153.56), BigDecimal.valueOf(-26.59)))
);
featureGeoJSON3.setProperties(Map.of(
FeatureProperty.COUNT.getValue(), 14.0,
FeatureProperty.START_TIME.getValue(), "2023-02-01T00:00:00.000Z",
Expand Down Expand Up @@ -538,7 +547,10 @@ public void verifyAggregationFeatureSummaryWithPageCorrect() throws IOException
// Sample1
FeatureGeoJSON featureGeoJSON1 = new FeatureGeoJSON();
featureGeoJSON1.setType(FeatureGeoJSON.TypeEnum.FEATURE);
featureGeoJSON1.setGeometry(new PointGeoJSON().coordinates(List.of(BigDecimal.valueOf(163.56), BigDecimal.valueOf(-26.59))));
featureGeoJSON1.setGeometry(new PointGeoJSON()
.type(PointGeoJSON.TypeEnum.POINT)
.coordinates(List.of(BigDecimal.valueOf(163.56), BigDecimal.valueOf(-26.59)))
);
featureGeoJSON1.setProperties(Map.of(
FeatureProperty.COUNT.getValue(), 14.0,
FeatureProperty.START_TIME.getValue(), "2023-02-01T00:00:00.000Z",
Expand All @@ -550,7 +562,10 @@ public void verifyAggregationFeatureSummaryWithPageCorrect() throws IOException
// Sample5
FeatureGeoJSON featureGeoJSON2 = new FeatureGeoJSON();
featureGeoJSON2.setType(FeatureGeoJSON.TypeEnum.FEATURE);
featureGeoJSON2.setGeometry(new PointGeoJSON().coordinates(List.of(BigDecimal.valueOf(163.56), BigDecimal.valueOf(-126.59))));
featureGeoJSON2.setGeometry(new PointGeoJSON()
.type(PointGeoJSON.TypeEnum.POINT)
.coordinates(List.of(BigDecimal.valueOf(163.56), BigDecimal.valueOf(-126.59)))
);
featureGeoJSON2.setProperties(Map.of(
FeatureProperty.COUNT.getValue(), 20.0,
FeatureProperty.START_TIME.getValue(), "2022-12-01T00:00:00.000Z",
Expand Down
Loading