use of org.opensearch.geometry.GeometryCollection in project OpenSearch by opensearch-project.
the class GeometryIO method readGeometryCollection.
private static GeometryCollection<Geometry> readGeometryCollection(StreamInput in) throws IOException {
int size = in.readVInt();
List<Geometry> shapes = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
shapes.add(readGeometry(in));
}
return new GeometryCollection<>(shapes);
}
use of org.opensearch.geometry.GeometryCollection in project OpenSearch by opensearch-project.
the class GeometryTestUtils method randomGeometryCollection.
private static GeometryCollection<Geometry> randomGeometryCollection(int level, boolean hasAlt) {
int size = OpenSearchTestCase.randomIntBetween(1, 10);
List<Geometry> shapes = new ArrayList<>();
for (int i = 0; i < size; i++) {
shapes.add(randomGeometry(level, hasAlt));
}
return new GeometryCollection<>(shapes);
}
Aggregations