##########################################################################
# Script demonstract raster functions using BlueSprayPy
# Date: 4/12/2016
# Author: Jim Graham
##########################################################################

from BlueSprayPy import * 

# Load a dem

FilePath="C:/Temp/Tiny_elevation.img"

TheRaster=STBlueSpray.LoadFromFile(FilePath)

TheRaster.SaveToFile("C:/Temp/Test.tif")

# Print information on the raster

TheInfo=TheRaster.GetInfo()
print(TheInfo)

# Create a slope raster

TheSlopeRaster=TheRaster.Slope()

TheSlopeRaster.SaveToFile("C:/Temp/Slope.TIF")

# Add 10 to the raster

TheAddedRaster=TheRaster.Add(10)

TheInfo=TheAddedRaster.GetInfo()
print(TheInfo) # the min and max should have increased by 10

TheAddedRaster.SaveToFile("C:/Temp/Added.tif")
