EcohydroLib
1.29
|
Methods for querying HYDRO1k basins. More...
Functions | |
def | getCatchmentShapefileForHYDRO1kBasins (config, outputDir, catchmentFilename, basins) |
Get shapefile (in WGS 84) for the drainage area associated with a list of HYDRO1k basins. More... | |
Methods for querying HYDRO1k basins.
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.hydro1k.basins.getCatchmentShapefileForHYDRO1kBasins | ( | config, | |
outputDir, | |||
catchmentFilename, | |||
basins | |||
) |
Get shapefile (in WGS 84) for the drainage area associated with a list of HYDRO1k basins.
config | A Python ConfigParser containing the following sections and options: 'GDAL/OGR' and option 'PATH_OF_OGR2OGR' (absolute path of ogr2ogr binary) 'HYDRO1k' and option 'PATH_OF_HYDRO1K_BAS' (absolute path to HYDRO1k North America na_bas.e00) |
outputDir | String representing the absolute/relative path of the directory into which output rasters should be written |
catchmentFilename | String representing name of file to save catchment shapefile to |
basins | List of strings representing basin IDs; must be of the same level: 1, 2, 3, 4, 5, 6 where level corresponds to the number of characters in the ID string. |
ConfigParser.NoSectionError | |
ConfigParser.NoOptionError | |
IOError(errno.ENOTDIR) | if outputDir is not a directory |
IOError(errno.EACCESS) | if outputDir is not writable |
Exception | of catchment shapefile extraction fails |