
GeoWave Quickstart Guide - Raster Demo
In the Raster Demo, the Geowave Service creates a mosaic image from a set of raster images. The analyze commands prints out the metadata of available imagery matching your criteria to select ones that meet parameters of interest, and the ingest command downloads those images and combines them to create a mosaic.
Set-Up Environment Variables
Download and source the GeoWave environment script.
If you have already done this in the Vector Demo, you can skip this step. |
This script defines a number of the variables that will be used in future commands.
cd /mnt
sudo wget s3.amazonaws.com/geowave/1.0.0/scripts/sandbox/quickstart/geowave-env.sh
source /mnt/geowave-env.sh
Download and Unpack the GDAL Library
GDAL (Geospatial Data Abstraction Library) is an image processing library. We need to download the proper GDAL files to process the raster data. More info on GDAL can be found here.
Make sure the /mnt/gdal directory matches your install path |
sudo mkdir /mnt/gdal
cd /mnt/gdal
sudo wget http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.7/native/gdal/linux/gdal192-CentOS5.8-gcc4.1.2-x86_64.tar.gz
sudo tar -xvf gdal192-CentOS5.8-gcc4.1.2-x86_64.tar.gz
Set the path to the GDAL libraries.
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/mnt/gdal
At this point, we should be ready to ingest the data.
Config and Ingest
-
Add a GeoWave store
We need to create two GeoWave stores for this ingest. landsat_raster will store the raster images, and landsat_vector stores the vector metadata associated with those images. The images come from the Landsat 8 Satellite.
-
If using the Standalone Installer:
-
Redis
geowave store add -t redis --address redis://127.0.0.1:6379 landsatraster --gwNamespace landsat_raster geowave store copycfg landsatraster landsatvector --gwNamespace landsat_vector
-
RocksDB
geowave store add -t rocksdb landsatraster --gwNamespace landsat_raster geowave store copycfg landsatraster landsatvector --gwNamespace landsat_vector
-
HBase
geowave store add landsatraster --gwNamespace landsat_raster -t hbase -z localhost:2181 geowave store copycfg landsatraster landsatvector --gwNamespace landsat_vector
-
Accumulo
geowave store add -t accumulo -z localhost:2181 landsatraster -instance accumulo -u root -p secret geowave store copycfg landsatraster landsatvector
-
-
If running with EMR
-
Accumulo
geowave store add -t accumulo -z $HOSTNAME:2181 landsatraster --gwNamespace geowave.landsat_raster \ -i accumulo -u geowave -p geowave geowave store copycfg landsatraster landsatvector --gwNamespace geowave.landsat_vector
-
HBase
geowave store add -t hbase -z $HOSTNAME:2181 landsatraster --gwNamespace geowave.landsat_raster geowave store copycfg landsatraster landsatvector --gwNamespace geowave.landsat_vector
-
Cassandra
geowave store add -t cassandra --contactPoints localhost landsatraster --gwNamespace geowave.landsat_raster --batchWriteSize 15 geowave store copycfg landsatraster landsatvector --gwNamespace geowave.landsat_vector
-
-
-
Add a spatial index.
We’re going to project this data over the Web Mercator Coordinate Reference System (CRS) to demonstrate GeoWave’s Configurable Indexed CRS capabilities.
geowave index add landsatraster spatial -t spatial -c EPSG:3857 geowave index add landsatvector spatial -t spatial -c EPSG:3857
-
Show available data by calling analyze.
In this example we look for Band 8 images that are in Berlin.
geowave util landsat analyze --nbestperspatial --nbestscenes 1 --usecachedscenes --cql "INTERSECTS(shape,$GERMANY) AND band='B8' AND cloudCover>0" -ws /mnt/landsat geowave util landsat analyze --nbestperspatial --nbestscenes 1 --usecachedscenes --cql "$BERLIN_BBOX AND band='B8' AND cloudCover>0" -ws /mnt/landsat
-
Ingest the data into geowave
Call the ingest command to download the data, ingest it into the GeoWave stores, and create the mosaic image. Status can be monitored at using HBase or Accumulo web interface. See the Interacting with the cluster section help doing so. More information on the landsat ingest and analyze commands can be found here.
geowave util landsat ingest --nbestperspatial --nbestscenes 1 --usecachedscenes --cql "$BERLIN_BBOX AND band='B8' AND cloudCover>0" --crop --retainimages -ws /mnt/landsat --vectorstore landsatvector --pyramid --coverage berlin_mosaic landsatraster spatial
Proceed to GeoServer Integration to walkthrough visualizing the ingested data.