Python scripts for exporting a raster (supported by GDAL) to SciDB binary format
- Python.
- Python GDAL.
- GDAL.
- SciDB.
- These scripts must be installed on the SciDB coordinator instance and they must be ran using an user enabled to execute IQUERY.
LICENSE
- License file.README.md
- This file.gdalAdd2bin.py
- Script that export/adds an GDAL-supported raster file to SciDB's binary format.gdalCheckFolder.py
- Script that checks a folder for SciDB's binary files.gdalLoad2scidb.py
- Script that loads a binary file to a SciDB database.installGdalHdf.sh
- Script that compiles GDAL with HDF and NetCDF support.
- Download the scripts to the script-folder
- Create a destination array in SciDB. This is the dest-array
-
CREATE ARRAY MOD13Q1_TEST009_20140605 <ndvi:int16, evi:int16, quality:uint16, red:int16, nir:int16, blue:int16, mir:int16, viewza:int16, sunza:int16, relaza:int16, cdoy:int16, reli:int16> [col_id=48000:72000,502,5,row_id=38400:62400,502,5,time_id=0:9200,1,0];
-
- Create a folder accesible by SciDB. This is the check-folder from where data is loaded to SciDB.
- Run
gdalCheckFolder.py
pointing to the check-folder, the script checks the folder for binary files. this script must be able to find and rungdalLoad2scidb.py
in the script-folder. - Run
gdalAdd2bin.py
to export MODIS HDFs to binary files. The resulting files can be stored in the check-folder.
- The GDALDataType and the array's attribute data-type must match. For example, when uploading a 3 band-TIF image, note below the array's uint8 attributes and the parameter gdalDatatype GDT_Byte:
CREATE ARRAY ANDRE_ROT <band01:uint8,band02:uint8,band03:uint8> [col_id=0:14840,502,5,row_id=0:10915,502,5,time_id=0:20000,1,0]
python /home/scidb/andre/gdal2scidb/gdalAdd2bin.py --log INFO --gdalDatatype GDT_Byte /home/scidb/andre/data/Aerial_Image/rot.tif /home/scidb/andre/data/Aerial_Image/rot.sdbbin
python /home/scidb/andre/gdal2scidb/gdalLoad2scidb.py /home/scidb/andre/data/Aerial_Image/rot.sdbbin ANDRE_ROT