EcohydroLib  1.29
Functions | Variables
ecohydrolib.geosciaus.soilwcs Namespace Reference

Query soils data from WCS service provided by CSIRO/Geoscience Australia. More...

Functions

def ordinalToAlpha (ordinal)
 Return unicode character ranging from A-Z for ordinal values from 1-26. More...
 
def getSoilsRasterDataForBoundingBox
 Download soil property rasters from http://www.clw.csiro.au/aclep/soilandlandscapegrid/ For each property, rasters for the first 1-m of the soil profile will be downloaded from which the depth-weighted mean of the property will be calculated and stored in outpufDir. More...
 

Variables

string FORMAT_GEOTIFF = 'GeoTIFF'
 
tuple FORMATS = set([FORMAT_GEOTIFF])
 
dictionary MIME_TYPE = {FORMAT_GEOTIFF: 'image/GeoTIFF'}
 
dictionary VARIABLE
 
string URL_BASE = "http://www.asris.csiro.au/ArcGis/services/TERN/{variable}_ACLEP_AU_TRN_N/MapServer/WCSServer"
 
string DC_PUBLISHER = "http://www.clw.csiro.au/aclep/soilandlandscapegrid/"
 
list COVERAGES
 
dictionary WEIGHTS
 

Detailed Description

Query soils data from WCS service provided by CSIRO/Geoscience Australia.

This software is provided free of charge under the New BSD License. Please see the following license information:

Copyright (c) 2015, University of North Carolina at Chapel Hill All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author
Brian Miles brian.nosp@m._mil.nosp@m.es@un.nosp@m.c.ed.nosp@m.u

Function Documentation

def ecohydrolib.geosciaus.soilwcs.getSoilsRasterDataForBoundingBox (   config,
  outputDir,
  bbox,
  srs = 'EPSG:4326',
  resx = 0.000277777777778,
  resy = 0.000277777777778,
  interpolation = 'bilinear',
  fmt = FORMAT_GEOTIFF,
  overwrite = False,
  verbose = False,
  outfp = sys.stdout 
)

Download soil property rasters from http://www.clw.csiro.au/aclep/soilandlandscapegrid/ For each property, rasters for the first 1-m of the soil profile will be downloaded from which the depth-weighted mean of the property will be calculated and stored in outpufDir.

Parameters
configA Python ConfigParser (not currently used)
outputDirString representing the absolute/relative path of the directory into which output raster should be written
bboxDict representing the lat/long coordinates and spatial reference of the bounding box area for which the raster is to be extracted. The following keys must be specified: minX, minY, maxX, maxY, srs.
srsString representing the spatial reference of the raster to be returned.
resxFloat representing the X resolution of the raster(s) to be returned
resyFloat representing the Y resolution of the raster(s) to be returned
interpolationString representing resampling method to use. Must be one of spatialdatalib.utils.RASTER_RESAMPLE_METHOD.
fmtString representing format of raster file. Must be one of FORMATS.
overwriteBoolean True if existing data should be overwritten
verboseBoolean True if detailed output information should be printed to outfp
outfpFile-like object to which verbose output should be printed
Returns
A dictionary mapping soil property names to soil property file path and WCS URL, i.e. dict[soilPropertyName] = (soilPropertyFilePath, WCS URL)
Exceptions
Exceptionif interpolation method is not known
Exceptionif fmt is not a known format
Exceptionif output already exists by overwrite is False
Exceptionif a gdal_calc.py command fails
def ecohydrolib.geosciaus.soilwcs.ordinalToAlpha (   ordinal)

Return unicode character ranging from A-Z for ordinal values from 1-26.

Variable Documentation

list ecohydrolib.geosciaus.soilwcs.COVERAGES
Initial value:
1 = ["{variable}_000_005_EV_N_P_AU_TRN_N_1", # 0-5cm
2  "{variable}_005_015_EV_N_P_AU_TRN_N_4", # 5-15cm
3  "{variable}_015_030_EV_N_P_AU_TRN_N_7", # 15-30cm
4  "{variable}_030_060_EV_N_P_AU_TRN_N_10", # 30-60cm
5  "{variable}_060_100_EV_N_P_AU_TRN_N_13", # 60-100cm
6  ]
string ecohydrolib.geosciaus.soilwcs.DC_PUBLISHER = "http://www.clw.csiro.au/aclep/soilandlandscapegrid/"
string ecohydrolib.geosciaus.soilwcs.FORMAT_GEOTIFF = 'GeoTIFF'
tuple ecohydrolib.geosciaus.soilwcs.FORMATS = set([FORMAT_GEOTIFF])
dictionary ecohydrolib.geosciaus.soilwcs.MIME_TYPE = {FORMAT_GEOTIFF: 'image/GeoTIFF'}
string ecohydrolib.geosciaus.soilwcs.URL_BASE = "http://www.asris.csiro.au/ArcGis/services/TERN/{variable}_ACLEP_AU_TRN_N/MapServer/WCSServer"
dictionary ecohydrolib.geosciaus.soilwcs.VARIABLE
Initial value:
1 = {'clay': 'CLY',
2  'silt': 'SLT',
3  'sand': 'SND'
4  }
dictionary ecohydrolib.geosciaus.soilwcs.WEIGHTS
Initial value:
1 = {COVERAGES[0]: float(5)/float(100), # 0-5cm
2  COVERAGES[1]: float(10)/float(100), # 5-15cm
3  COVERAGES[2]: float(15)/float(100), # 15-30cm
4  COVERAGES[3]: float(30)/float(100), # 30-60cm
5  COVERAGES[4]: float(40)/float(100), # 60-100cm
6  }