Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
/ gdal2scidb Public archive

Python scripts for exporting a raster (supported by GDAL) to SciDB binary format

License

Notifications You must be signed in to change notification settings

albhasan/gdal2scidb

Repository files navigation

gdal2scidb

Python scripts for exporting a raster (supported by GDAL) to SciDB binary format

Pre-requisites:

  • 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.

Files:

  • 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.

Instructions:

  1. Download the scripts to the script-folder
  2. 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];
  3. Create a folder accesible by SciDB. This is the check-folder from where data is loaded to SciDB.
  4. Run gdalCheckFolder.py pointing to the check-folder, the script checks the folder for binary files. this script must be able to find and run gdalLoad2scidb.py in the script-folder.
  5. Run gdalAdd2bin.py to export MODIS HDFs to binary files. The resulting files can be stored in the check-folder.

Notes

  • 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

About

Python scripts for exporting a raster (supported by GDAL) to SciDB binary format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published