Search in sources :

Example 1 with Index

use of org.locationtech.geowave.core.store.api.Index in project geowave by locationtech.

the class KDESparkCommand method computeResults.

@Override
public Void computeResults(final OperationParams params) throws Exception {
    final String inputStoreName = parameters.get(0);
    final String outputStoreName = parameters.get(1);
    // Config file
    final File configFile = getGeoWaveConfigFile(params);
    // Attempt to load input store.
    inputDataStore = CLIUtils.loadStore(inputStoreName, configFile, params.getConsole());
    // Attempt to load output store.
    outputDataStore = CLIUtils.loadStore(outputStoreName, configFile, params.getConsole());
    final KDERunner runner = new KDERunner();
    runner.setAppName(kdeSparkOptions.getAppName());
    runner.setMaster(kdeSparkOptions.getMaster());
    runner.setHost(kdeSparkOptions.getHost());
    runner.setSplits(kdeSparkOptions.getMinSplits(), kdeSparkOptions.getMaxSplits());
    runner.setInputDataStore(inputDataStore);
    runner.setTypeName(kdeSparkOptions.getTypeName());
    runner.setOutputDataStore(outputDataStore);
    runner.setCoverageName(kdeSparkOptions.getCoverageName());
    runner.setIndexName(kdeSparkOptions.getIndexName());
    runner.setMinLevel(kdeSparkOptions.getMinLevel());
    runner.setMaxLevel(kdeSparkOptions.getMaxLevel());
    runner.setTileSize((int) Math.sqrt(kdeSparkOptions.getTileSize()));
    if ((kdeSparkOptions.getOutputIndex() != null) && !kdeSparkOptions.getOutputIndex().trim().isEmpty()) {
        final String outputIndex = kdeSparkOptions.getOutputIndex();
        // Load the Indices
        final List<Index> outputIndices = DataStoreUtils.loadIndices(outputDataStore.createIndexStore(), outputIndex);
        for (final Index primaryIndex : outputIndices) {
            if (SpatialDimensionalityTypeProvider.isSpatial(primaryIndex)) {
                runner.setOutputIndex(primaryIndex);
            } else {
                LOGGER.error("spatial temporal is not supported for output index. Only spatial index is supported.");
                throw new IOException("spatial temporal is not supported for output index. Only spatial index is supported.");
            }
        }
    }
    if (kdeSparkOptions.getCqlFilter() != null) {
        runner.setCqlFilter(kdeSparkOptions.getCqlFilter());
    }
    runner.setOutputDataStore(outputDataStore);
    try {
        runner.run();
    } catch (final IOException e) {
        throw new RuntimeException("Failed to execute: " + e.getMessage());
    } finally {
        runner.close();
    }
    return null;
}
Also used : KDERunner(org.locationtech.geowave.analytic.spark.kde.KDERunner) Index(org.locationtech.geowave.core.store.api.Index) IOException(java.io.IOException) File(java.io.File)

Example 2 with Index

use of org.locationtech.geowave.core.store.api.Index in project geowave by locationtech.

the class KMeansUtils method writeClusterHulls.

public static DataTypeAdapter writeClusterHulls(final JavaRDD<Vector> inputCentroids, final KMeansModel clusterModel, final DataStorePluginOptions outputDataStore, final String hullAdapterName, final boolean computeMetadata) {
    final JavaPairRDD<Integer, Iterable<Vector>> groupByRdd = KMeansHullGenerator.groupByIndex(inputCentroids, clusterModel);
    final JavaPairRDD<Integer, Geometry> hullRdd = KMeansHullGenerator.generateHullsRDD(groupByRdd);
    final SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
    typeBuilder.setName(hullAdapterName);
    typeBuilder.setNamespaceURI(BasicFeatureTypes.DEFAULT_NAMESPACE);
    try {
        typeBuilder.setCRS(CRS.decode("EPSG:4326", true));
    } catch (final FactoryException e) {
        LOGGER.error(e.getMessage(), e);
    }
    final AttributeTypeBuilder attrBuilder = new AttributeTypeBuilder();
    typeBuilder.add(attrBuilder.binding(Geometry.class).nillable(false).buildDescriptor(Geometry.class.getName().toString()));
    typeBuilder.add(attrBuilder.binding(Integer.class).nillable(false).buildDescriptor("ClusterIndex"));
    typeBuilder.add(attrBuilder.binding(Integer.class).nillable(false).buildDescriptor("Count"));
    typeBuilder.add(attrBuilder.binding(Double.class).nillable(false).buildDescriptor("Area"));
    typeBuilder.add(attrBuilder.binding(Double.class).nillable(false).buildDescriptor("Density"));
    final SimpleFeatureType sfType = typeBuilder.buildFeatureType();
    final SimpleFeatureBuilder sfBuilder = new SimpleFeatureBuilder(sfType);
    final FeatureDataAdapter featureAdapter = new FeatureDataAdapter(sfType);
    final DataStore featureStore = outputDataStore.createDataStore();
    final Index featureIndex = SpatialDimensionalityTypeProvider.createIndexFromOptions(new SpatialOptions());
    final PolygonAreaCalculator polyCalc = (computeMetadata ? new PolygonAreaCalculator() : null);
    featureStore.addType(featureAdapter, featureIndex);
    try (Writer writer = featureStore.createWriter(featureAdapter.getTypeName())) {
        for (final Tuple2<Integer, Geometry> hull : hullRdd.collect()) {
            final Integer index = hull._1;
            final Geometry geom = hull._2;
            sfBuilder.set(Geometry.class.getName(), geom);
            sfBuilder.set("ClusterIndex", index);
            int count = 0;
            double area = 0.0;
            double density = 0.0;
            if (computeMetadata) {
                for (final Iterable<Vector> points : groupByRdd.lookup(index)) {
                    final Vector[] pointVec = Iterables.toArray(points, Vector.class);
                    count += pointVec.length;
                }
                try {
                    // HP Fortify "NULL Pointer Dereference" false positive
                    // Exception handling will catch if polyCalc is null
                    area = polyCalc.getAreaDensify(geom);
                    density = count / area;
                } catch (final Exception e) {
                    LOGGER.error("Problem computing polygon area: " + e.getMessage());
                }
            }
            sfBuilder.set("Count", count);
            sfBuilder.set("Area", area);
            sfBuilder.set("Density", density);
            final SimpleFeature sf = sfBuilder.buildFeature("Hull-" + index);
            writer.write(sf);
        }
    }
    return featureAdapter;
}
Also used : SimpleFeatureTypeBuilder(org.geotools.feature.simple.SimpleFeatureTypeBuilder) FactoryException(org.opengis.referencing.FactoryException) Index(org.locationtech.geowave.core.store.api.Index) AttributeTypeBuilder(org.geotools.feature.AttributeTypeBuilder) DataStore(org.locationtech.geowave.core.store.api.DataStore) Vector(org.apache.spark.mllib.linalg.Vector) PolygonAreaCalculator(org.locationtech.geowave.adapter.vector.util.PolygonAreaCalculator) SpatialOptions(org.locationtech.geowave.core.geotime.index.SpatialOptions) FactoryException(org.opengis.referencing.FactoryException) SimpleFeature(org.opengis.feature.simple.SimpleFeature) Geometry(org.locationtech.jts.geom.Geometry) SimpleFeatureType(org.opengis.feature.simple.SimpleFeatureType) FeatureDataAdapter(org.locationtech.geowave.adapter.vector.FeatureDataAdapter) Writer(org.locationtech.geowave.core.store.api.Writer) SimpleFeatureBuilder(org.geotools.feature.simple.SimpleFeatureBuilder)

Example 3 with Index

use of org.locationtech.geowave.core.store.api.Index in project geowave by locationtech.

the class RasterTileResizeSparkRunner method run.

public void run() throws IOException {
    initContext();
    // Validate inputs
    if (inputStoreOptions == null) {
        LOGGER.error("You must supply an input datastore!");
        throw new IOException("You must supply an input datastore!");
    }
    final InternalAdapterStore internalAdapterStore = inputStoreOptions.createInternalAdapterStore();
    final short internalAdapterId = internalAdapterStore.getAdapterId(rasterResizeOptions.getInputCoverageName());
    final DataTypeAdapter adapter = inputStoreOptions.createAdapterStore().getAdapter(internalAdapterId).getAdapter();
    if (adapter == null) {
        throw new IllegalArgumentException("Adapter for coverage '" + rasterResizeOptions.getInputCoverageName() + "' does not exist in namespace '" + inputStoreOptions.getGeoWaveNamespace() + "'");
    }
    Index index = null;
    final IndexStore indexStore = inputStoreOptions.createIndexStore();
    if (rasterResizeOptions.getIndexName() != null) {
        index = indexStore.getIndex(rasterResizeOptions.getIndexName());
    }
    if (index == null) {
        try (CloseableIterator<Index> indices = indexStore.getIndices()) {
            index = indices.next();
        }
        if (index == null) {
            throw new IllegalArgumentException("Index does not exist in namespace '" + inputStoreOptions.getGeoWaveNamespace() + "'");
        }
    }
    final RasterDataAdapter newAdapter = new RasterDataAdapter((RasterDataAdapter) adapter, rasterResizeOptions.getOutputCoverageName(), rasterResizeOptions.getOutputTileSize());
    final DataStore store = outputStoreOptions.createDataStore();
    store.addType(newAdapter, index);
    final short newInternalAdapterId = outputStoreOptions.createInternalAdapterStore().addTypeName(newAdapter.getTypeName());
    final RDDOptions options = new RDDOptions();
    if (rasterResizeOptions.getMinSplits() != null) {
        options.setMinSplits(rasterResizeOptions.getMinSplits());
    }
    if (rasterResizeOptions.getMaxSplits() != null) {
        options.setMaxSplits(rasterResizeOptions.getMaxSplits());
    }
    final JavaPairRDD<GeoWaveInputKey, GridCoverage> inputRDD = GeoWaveRDDLoader.loadRawRasterRDD(jsc.sc(), inputStoreOptions, index.getName(), rasterResizeOptions.getMinSplits(), rasterResizeOptions.getMaxSplits());
    LOGGER.debug("Writing results to output store...");
    RDDUtils.writeRasterToGeoWave(jsc.sc(), index, outputStoreOptions, newAdapter, inputRDD.flatMapToPair(new RasterResizeMappingFunction(internalAdapterId, newInternalAdapterId, newAdapter, index)).groupByKey().map(new MergeRasterFunction(internalAdapterId, newInternalAdapterId, newAdapter, index)));
    LOGGER.debug("Results successfully written!");
}
Also used : InternalAdapterStore(org.locationtech.geowave.core.store.adapter.InternalAdapterStore) DataTypeAdapter(org.locationtech.geowave.core.store.api.DataTypeAdapter) Index(org.locationtech.geowave.core.store.api.Index) IOException(java.io.IOException) GeoWaveInputKey(org.locationtech.geowave.mapreduce.input.GeoWaveInputKey) RDDOptions(org.locationtech.geowave.analytic.spark.RDDOptions) RasterDataAdapter(org.locationtech.geowave.adapter.raster.adapter.RasterDataAdapter) FitToIndexGridCoverage(org.locationtech.geowave.adapter.raster.FitToIndexGridCoverage) GridCoverage(org.opengis.coverage.grid.GridCoverage) DataStore(org.locationtech.geowave.core.store.api.DataStore) IndexStore(org.locationtech.geowave.core.store.index.IndexStore)

Example 4 with Index

use of org.locationtech.geowave.core.store.api.Index in project geowave by locationtech.

the class RDDUtils method writeToGeoWave.

/**
 * Translate a set of objects in a JavaRDD to a provided type and push to GeoWave
 *
 * @throws IOException
 */
private static void writeToGeoWave(final SparkContext sc, final Index index, final DataStorePluginOptions outputStoreOptions, final DataTypeAdapter adapter, final JavaRDD<SimpleFeature> inputRDD) throws IOException {
    // setup the configuration and the output format
    final Configuration conf = new org.apache.hadoop.conf.Configuration(sc.hadoopConfiguration());
    GeoWaveOutputFormat.setStoreOptions(conf, outputStoreOptions);
    GeoWaveOutputFormat.addIndex(conf, index);
    GeoWaveOutputFormat.addDataAdapter(conf, adapter);
    // create the job
    final Job job = new Job(conf);
    job.setOutputKeyClass(GeoWaveOutputKey.class);
    job.setOutputValueClass(SimpleFeature.class);
    job.setOutputFormatClass(GeoWaveOutputFormat.class);
    // broadcast string names
    final ClassTag<String> stringTag = scala.reflect.ClassTag$.MODULE$.apply(String.class);
    final Broadcast<String> typeName = sc.broadcast(adapter.getTypeName(), stringTag);
    final Broadcast<String> indexName = sc.broadcast(index.getName(), stringTag);
    // map to a pair containing the output key and the output value
    inputRDD.mapToPair(feat -> new Tuple2<>(new GeoWaveOutputKey(typeName.value(), indexName.value()), feat)).saveAsNewAPIHadoopDataset(job.getConfiguration());
}
Also used : RasterDataAdapter(org.locationtech.geowave.adapter.raster.adapter.RasterDataAdapter) Vectors(org.apache.spark.mllib.linalg.Vectors) ClassTag(scala.reflect.ClassTag) Date(java.util.Date) LoggerFactory(org.slf4j.LoggerFactory) ScaledTemporalRange(org.locationtech.geowave.core.geotime.store.query.ScaledTemporalRange) SimpleFeature(org.opengis.feature.simple.SimpleFeature) Configuration(org.apache.hadoop.conf.Configuration) DataTypeAdapter(org.locationtech.geowave.core.store.api.DataTypeAdapter) JTS(org.geotools.geometry.jts.JTS) Index(org.locationtech.geowave.core.store.api.Index) JavaRDD(org.apache.spark.api.java.JavaRDD) Broadcast(org.apache.spark.broadcast.Broadcast) SinglePartitionInsertionIds(org.locationtech.geowave.core.index.SinglePartitionInsertionIds) GeoWaveOutputKey(org.locationtech.geowave.mapreduce.output.GeoWaveOutputKey) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) GridCoverage(org.opengis.coverage.grid.GridCoverage) SparkContext(org.apache.spark.SparkContext) IOException(java.io.IOException) Point(org.locationtech.jts.geom.Point) Vector(org.apache.spark.mllib.linalg.Vector) Tuple2(scala.Tuple2) DataStorePluginOptions(org.locationtech.geowave.core.store.cli.store.DataStorePluginOptions) RectangleIntersects(org.locationtech.jts.operation.predicate.RectangleIntersects) InsertionIds(org.locationtech.geowave.core.index.InsertionIds) Job(org.apache.hadoop.mapreduce.Job) Polygon(org.locationtech.jts.geom.Polygon) Geometry(org.locationtech.jts.geom.Geometry) MultiDimensionalNumericData(org.locationtech.geowave.core.index.numeric.MultiDimensionalNumericData) GeoWaveOutputFormat(org.locationtech.geowave.mapreduce.output.GeoWaveOutputFormat) NumericIndexStrategy(org.locationtech.geowave.core.index.NumericIndexStrategy) Envelope(org.locationtech.jts.geom.Envelope) Configuration(org.apache.hadoop.conf.Configuration) Tuple2(scala.Tuple2) Job(org.apache.hadoop.mapreduce.Job) GeoWaveOutputKey(org.locationtech.geowave.mapreduce.output.GeoWaveOutputKey)

Example 5 with Index

use of org.locationtech.geowave.core.store.api.Index in project geowave by locationtech.

the class KDERunner method run.

public void run() throws IOException {
    initContext();
    // Validate inputs
    if (inputDataStore == null) {
        LOGGER.error("You must supply an input datastore!");
        throw new IOException("You must supply an input datastore!");
    }
    // Retrieve the feature adapters
    final VectorQueryBuilder bldr = VectorQueryBuilder.newBuilder();
    List<String> featureTypeNames;
    // If provided, just use the one
    if (typeName != null) {
        featureTypeNames = new ArrayList<>();
        featureTypeNames.add(typeName);
    } else {
        // otherwise, grab all the feature adapters
        featureTypeNames = FeatureDataUtils.getFeatureTypeNames(inputDataStore);
    }
    bldr.setTypeNames(featureTypeNames.toArray(new String[0]));
    if (indexName != null) {
        bldr.indexName(indexName);
    }
    Index inputPrimaryIndex = null;
    final Index[] idxArray = inputDataStore.createDataStore().getIndices();
    for (final Index idx : idxArray) {
        if ((idx != null) && ((indexName == null) || indexName.equals(idx.getName()))) {
            inputPrimaryIndex = idx;
            break;
        }
    }
    final CoordinateReferenceSystem inputIndexCrs = GeometryUtils.getIndexCrs(inputPrimaryIndex);
    final String inputCrsCode = GeometryUtils.getCrsCode(inputIndexCrs);
    Index outputPrimaryIndex = outputIndex;
    CoordinateReferenceSystem outputIndexCrs = null;
    final String outputCrsCode;
    if (outputPrimaryIndex != null) {
        outputIndexCrs = GeometryUtils.getIndexCrs(outputPrimaryIndex);
        outputCrsCode = GeometryUtils.getCrsCode(outputIndexCrs);
    } else {
        final SpatialDimensionalityTypeProvider sdp = new SpatialDimensionalityTypeProvider();
        final SpatialOptions so = sdp.createOptions();
        so.setCrs(inputCrsCode);
        outputPrimaryIndex = SpatialDimensionalityTypeProvider.createIndexFromOptions(so);
        outputIndexCrs = inputIndexCrs;
        outputCrsCode = inputCrsCode;
    }
    final CoordinateSystem cs = outputIndexCrs.getCoordinateSystem();
    final CoordinateSystemAxis csx = cs.getAxis(0);
    final CoordinateSystemAxis csy = cs.getAxis(1);
    final double xMax = csx.getMaximumValue();
    final double xMin = csx.getMinimumValue();
    final double yMax = csy.getMaximumValue();
    final double yMin = csy.getMinimumValue();
    if ((xMax == Double.POSITIVE_INFINITY) || (xMin == Double.NEGATIVE_INFINITY) || (yMax == Double.POSITIVE_INFINITY) || (yMin == Double.NEGATIVE_INFINITY)) {
        LOGGER.error("Raster KDE resize with raster primary index CRS dimensions min/max equal to positive infinity or negative infinity is not supported");
        throw new RuntimeException("Raster KDE resize with raster primary index CRS dimensions min/max equal to positive infinity or negative infinity is not supported");
    }
    if (cqlFilter != null) {
        bldr.constraints(bldr.constraintsFactory().cqlConstraints(cqlFilter));
    }
    // Load RDD from datastore
    final RDDOptions kdeOpts = new RDDOptions();
    kdeOpts.setMinSplits(minSplits);
    kdeOpts.setMaxSplits(maxSplits);
    kdeOpts.setQuery(bldr.build());
    final Function<Double, Double> identity = x -> x;
    final Function2<Double, Double, Double> sum = (final Double x, final Double y) -> {
        return x + y;
    };
    final RasterDataAdapter adapter = RasterUtils.createDataAdapterTypeDouble(coverageName, KDEReducer.NUM_BANDS, tileSize, MINS_PER_BAND, MAXES_PER_BAND, NAME_PER_BAND, new NoDataMergeStrategy());
    outputDataStore.createDataStore().addType(adapter, outputPrimaryIndex);
    // The following "inner" variables are created to give access to member
    // variables within lambda
    // expressions
    // tileSize;
    final int innerTileSize = 1;
    final String innerCoverageName = coverageName;
    for (int level = minLevel; level <= maxLevel; level++) {
        final int numXTiles = (int) Math.pow(2, level + 1);
        final int numYTiles = (int) Math.pow(2, level);
        // * tileSize;
        final int numXPosts = numXTiles;
        // * tileSize;
        final int numYPosts = numYTiles;
        final GeoWaveRDD kdeRDD = GeoWaveRDDLoader.loadRDD(session.sparkContext(), inputDataStore, kdeOpts);
        JavaPairRDD<Double, Long> cells = kdeRDD.getRawRDD().flatMapToPair(new GeoWaveCellMapper(numXPosts, numYPosts, xMin, xMax, yMin, yMax, inputCrsCode, outputCrsCode)).combineByKey(identity, sum, sum).mapToPair(item -> item.swap());
        cells = cells.partitionBy(new RangePartitioner(cells.getNumPartitions(), cells.rdd(), true, scala.math.Ordering.Double$.MODULE$, scala.reflect.ClassTag$.MODULE$.apply(Double.class))).sortByKey(false).cache();
        final long count = cells.count();
        if (count == 0) {
            LOGGER.warn("No cells produced by KDE");
            continue;
        }
        final double max = cells.first()._1;
        JavaRDD<GridCoverage> rdd = cells.zipWithIndex().map(t -> {
            final TileInfo tileInfo = fromCellIndexToTileInfo(t._1._2, numXPosts, numYPosts, numXTiles, numYTiles, xMin, xMax, yMin, yMax, innerTileSize);
            final WritableRaster raster = RasterUtils.createRasterTypeDouble(NUM_BANDS, innerTileSize);
            final double normalizedValue = t._1._1 / max;
            // because we are using a Double as the key, the ordering
            // isn't always completely reproducible as Double equals does not
            // take into account an epsilon
            final double percentile = (count - t._2) / ((double) count);
            raster.setSample(tileInfo.x, tileInfo.y, 0, t._1._1);
            raster.setSample(tileInfo.x, tileInfo.y, 1, normalizedValue);
            raster.setSample(tileInfo.x, tileInfo.y, 2, percentile);
            return RasterUtils.createCoverageTypeDouble(innerCoverageName, tileInfo.tileWestLon, tileInfo.tileEastLon, tileInfo.tileSouthLat, tileInfo.tileNorthLat, MINS_PER_BAND, MAXES_PER_BAND, NAME_PER_BAND, raster, GeometryUtils.DEFAULT_CRS_STR);
        });
        LOGGER.debug("Writing results to output store...");
        if (tileSize > 1) {
            // byte[] adapterBytes = PersistenceUtils.toBinary(adapter);
            // byte[] indexBytes = PersistenceUtils.toBinary(outputPrimaryIndex);
            rdd = rdd.flatMapToPair(new TransformTileSize(adapter, outputPrimaryIndex)).groupByKey().map(new MergeOverlappingTiles(adapter, outputPrimaryIndex));
        }
        RDDUtils.writeRasterToGeoWave(jsc.sc(), outputPrimaryIndex, outputDataStore, adapter, rdd);
        LOGGER.debug("Results successfully written!");
    }
}
Also used : FactoryException(org.opengis.referencing.FactoryException) Arrays(java.util.Arrays) CRS(org.geotools.referencing.CRS) Function2(org.apache.spark.api.java.function.Function2) GeoWaveRDD(org.locationtech.geowave.analytic.spark.GeoWaveRDD) CoordinateSystemAxis(org.opengis.referencing.cs.CoordinateSystemAxis) PairFlatMapFunction(org.apache.spark.api.java.function.PairFlatMapFunction) PersistenceUtils(org.locationtech.geowave.core.index.persist.PersistenceUtils) URISyntaxException(java.net.URISyntaxException) GaussianFilter(org.locationtech.geowave.analytic.mapreduce.kde.GaussianFilter) ObjectInputStream(java.io.ObjectInputStream) LoggerFactory(org.slf4j.LoggerFactory) FitToIndexGridCoverage(org.locationtech.geowave.adapter.raster.FitToIndexGridCoverage) SimpleFeature(org.opengis.feature.simple.SimpleFeature) KDEReducer(org.locationtech.geowave.analytic.mapreduce.kde.KDEReducer) JTS(org.geotools.geometry.jts.JTS) TransformException(org.opengis.referencing.operation.TransformException) GeoWaveSparkConf(org.locationtech.geowave.analytic.spark.GeoWaveSparkConf) NoDataMergeStrategy(org.locationtech.geowave.adapter.raster.adapter.merge.nodata.NoDataMergeStrategy) Point(org.locationtech.jts.geom.Point) HadoopWritableSerializer(org.locationtech.geowave.mapreduce.HadoopWritableSerializer) GeometryUtils(org.locationtech.geowave.core.geotime.util.GeometryUtils) Tuple2(scala.Tuple2) Serializable(java.io.Serializable) List(java.util.List) Geometry(org.locationtech.jts.geom.Geometry) Function(org.apache.spark.api.java.function.Function) FilenameUtils(org.apache.commons.io.FilenameUtils) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings) GridCoverageWritable(org.locationtech.geowave.adapter.raster.adapter.GridCoverageWritable) CoordinateSystem(org.opengis.referencing.cs.CoordinateSystem) RasterDataAdapter(org.locationtech.geowave.adapter.raster.adapter.RasterDataAdapter) GeoWaveInputKey(org.locationtech.geowave.mapreduce.input.GeoWaveInputKey) VectorQueryBuilder(org.locationtech.geowave.core.geotime.store.query.api.VectorQueryBuilder) MismatchedDimensionException(org.opengis.geometry.MismatchedDimensionException) JavaSparkContext(org.apache.spark.api.java.JavaSparkContext) FeatureDataUtils(org.locationtech.geowave.adapter.vector.util.FeatureDataUtils) SpatialDimensionalityTypeProvider(org.locationtech.geowave.core.geotime.index.SpatialDimensionalityTypeProvider) Iterators(com.google.common.collect.Iterators) ArrayList(java.util.ArrayList) GeoWaveRDDLoader(org.locationtech.geowave.analytic.spark.GeoWaveRDDLoader) ObjectOutputStream(java.io.ObjectOutputStream) RasterUtils(org.locationtech.geowave.adapter.raster.RasterUtils) Index(org.locationtech.geowave.core.store.api.Index) JavaRDD(org.apache.spark.api.java.JavaRDD) SparkSession(org.apache.spark.sql.SparkSession) RDDUtils(org.locationtech.geowave.analytic.spark.RDDUtils) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) GridCoverage(org.opengis.coverage.grid.GridCoverage) RangePartitioner(org.apache.spark.RangePartitioner) IOException(java.io.IOException) JavaPairRDD(org.apache.spark.api.java.JavaPairRDD) RDDOptions(org.locationtech.geowave.analytic.spark.RDDOptions) CellCounter(org.locationtech.geowave.analytic.mapreduce.kde.CellCounter) SpatialOptions(org.locationtech.geowave.core.geotime.index.SpatialOptions) DataStorePluginOptions(org.locationtech.geowave.core.store.cli.store.DataStorePluginOptions) MathTransform(org.opengis.referencing.operation.MathTransform) ClientMergeableRasterTile(org.locationtech.geowave.adapter.raster.adapter.ClientMergeableRasterTile) WritableRaster(java.awt.image.WritableRaster) VectorQueryBuilder(org.locationtech.geowave.core.geotime.store.query.api.VectorQueryBuilder) CoordinateSystem(org.opengis.referencing.cs.CoordinateSystem) CoordinateSystemAxis(org.opengis.referencing.cs.CoordinateSystemAxis) Index(org.locationtech.geowave.core.store.api.Index) SpatialDimensionalityTypeProvider(org.locationtech.geowave.core.geotime.index.SpatialDimensionalityTypeProvider) WritableRaster(java.awt.image.WritableRaster) RangePartitioner(org.apache.spark.RangePartitioner) CoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem) IOException(java.io.IOException) SpatialOptions(org.locationtech.geowave.core.geotime.index.SpatialOptions) RDDOptions(org.locationtech.geowave.analytic.spark.RDDOptions) Point(org.locationtech.jts.geom.Point) RasterDataAdapter(org.locationtech.geowave.adapter.raster.adapter.RasterDataAdapter) NoDataMergeStrategy(org.locationtech.geowave.adapter.raster.adapter.merge.nodata.NoDataMergeStrategy) FitToIndexGridCoverage(org.locationtech.geowave.adapter.raster.FitToIndexGridCoverage) GridCoverage(org.opengis.coverage.grid.GridCoverage) GeoWaveRDD(org.locationtech.geowave.analytic.spark.GeoWaveRDD)

Aggregations

Index (org.locationtech.geowave.core.store.api.Index)169 DataStore (org.locationtech.geowave.core.store.api.DataStore)64 Test (org.junit.Test)61 SimpleFeature (org.opengis.feature.simple.SimpleFeature)45 SpatialOptions (org.locationtech.geowave.core.geotime.index.SpatialOptions)41 IndexStore (org.locationtech.geowave.core.store.index.IndexStore)40 ArrayList (java.util.ArrayList)37 IOException (java.io.IOException)33 InternalAdapterStore (org.locationtech.geowave.core.store.adapter.InternalAdapterStore)31 AdapterToIndexMapping (org.locationtech.geowave.core.store.AdapterToIndexMapping)28 AdapterIndexMappingStore (org.locationtech.geowave.core.store.adapter.AdapterIndexMappingStore)28 PersistentAdapterStore (org.locationtech.geowave.core.store.adapter.PersistentAdapterStore)28 DataStatisticsStore (org.locationtech.geowave.core.store.statistics.DataStatisticsStore)25 ParameterException (com.beust.jcommander.ParameterException)24 BasicQueryByClass (org.locationtech.geowave.core.store.query.constraints.BasicQueryByClass)24 SimpleFeatureType (org.opengis.feature.simple.SimpleFeatureType)24 List (java.util.List)22 FeatureDataAdapter (org.locationtech.geowave.adapter.vector.FeatureDataAdapter)21 DataStorePluginOptions (org.locationtech.geowave.core.store.cli.store.DataStorePluginOptions)21 InternalDataAdapter (org.locationtech.geowave.core.store.adapter.InternalDataAdapter)20