EcohydroLib
1.29
|
Rasterize SSURGO features. More...
Functions | |
def | deleteSoilRasters (context, manifest) |
Delete soil raster maps stored in a project. More... | |
def | rasterizeSSURGOFeatures |
Create raster maps, in GeoTIFF format, for SSURGO attributes associated with SSURGO MapunitPoly/MapunitPolyExtended features. More... | |
Variables | |
RASTER_ATTRIBUTES = attributequery.ATTRIBUTE_LIST_NUMERIC | |
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 ecohydrolib.ssurgo.rasterize.deleteSoilRasters | ( | context, | |
manifest | |||
) |
Delete soil raster maps stored in a project.
context | Context object containing projectDir, the path of the project whose metadata store is to be read from |
manifest | Dict containing manifest entries. Files associted with entries whose key begins with 'soil_raster_' will be deleted |
def ecohydrolib.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 |
ConfigParser.NoSectionError | |
ConfigParser.NoOptionError | |
Exception | if featureFilename is neither a SHP nor a GML file |
IOError(errno.ENOTDIR) | if outputDir is not a directory |
IOError(errno.EACCESS) | if outputDir is not writable |
IOError(errno.EACCESS) | if featureFilename is not readable |
IOError(errno.ENOENT) | if featureFilename is not a file |
IOError(errno.EACCES) | if getResolutionFromRasterFileNamed is not readable |
ValueError | if rasterResolutionX or rasterResolutionY are not floating point numbers greater than 0 |
Exception | if a gdal_rasterize command fails |
ecohydrolib.ssurgo.rasterize.RASTER_ATTRIBUTES = attributequery.ATTRIBUTE_LIST_NUMERIC |