Rasterize SSURGO features. More...
Functions | |
def | rasterizeSSURGOFeatures |
Create raster maps, in GeoTIFF format, for SSURGO attributes associated with SSURGO MapunitPoly/MapunitPolyExtended features. | |
Rasterize SSURGO features.
This software is provided free of charge under the New BSD License. Please see the following license information:
Copyright (c) 2013, 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.
def ecohydroworkflowlib.ssurgo.rasterize.rasterizeSSURGOFeatures | ( | config, | |
outputDir, | |||
featureFilename, | |||
featureLayername, | |||
featureAttrList, | |||
getResolutionFromRasterFileNamed = None , |
|||
rasterResolutionX = None , |
|||
rasterResolutionY = None |
|||
) |
Create raster maps, in GeoTIFF format, for SSURGO attributes associated with SSURGO MapunitPoly/MapunitPolyExtended features.
config | onfigParser containing the section 'GDAL/OGR' and option 'PATH_OF_GDAL_RASTERIZE' |
outputDir | String representing the absolute/relative path of the directory into which output rasters should be written |
featureFilename | String representing the absolute/relative path of the input feature in ESRI shapefile or OGC GML format |
featureLayername | String representing the name of feature layer whose features are to be rasterize |
featureAttrList | List containing the SSURGO attributes for which raster maps are to be created |
getResolutionFromRasterFileNamed | String representing the absolute path of an existing raster file from which the output raster resolution should be determined |
rasterResolutionX | Float representing the X resolution of the output rasters |
rasterResolutionY | Float representing the Y resolution of the output rasters |
@exception ConfigParser.NoSectionError @exception ConfigParser.NoOptionError @exception Exception if featureFilename is neither a SHP nor a GML file @exception IOError(errno.ENOTDIR) if outputDir is not a directory @exception IOError(errno.EACCESS) if outputDir is not writable @exception IOError(errno.EACCESS) if featureFilename is not readable @exception IOError(errno.ENOENT) if featureFilename is not a file @exception IOError(errno.EACCES) if getResolutionFromRasterFileNamed is not readable @exception ValueError if rasterResolutionX or rasterResolutionY are not floating point numbers greater than 0 @exception Exception if a gdal_rasterize command fails