All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geolatte.geom.generator.CombinedGeometryGenerator Maven / Gradle / Ivy

Go to download

This geoLatte-geom library offers a geometry model that conforms to the OGC Simple Features for SQL specification.

The newest version!
package org.geolatte.geom.generator;

import org.geolatte.geom.Geometry;
import org.geolatte.geom.Position;

import java.util.List;
import java.util.Random;

/**
 * Created by Karel Maesen, Geovise BVBA on 28/09/2018.
 */
class CombinedGeometryGenerator

implements Generator> { private final Random chooser; private final List>> generators; CombinedGeometryGenerator(Random rnd, List>> generators) { this.chooser = rnd; this.generators = generators; } @Override public Geometry

generate() { int idx = chooser.nextInt(generators.size()); return generators.get(idx).generate(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy