|
EcohydroLib
1.29
|
Classes | |
| class | USGSDEMCoverageHandler |
Functions | |
| def | getDEMForBoundingBox |
| Fetch U.S. More... | |
Variables | |
| int | _BUFF_LEN = 4096 |
| string | HOST = 'cida-test.er.usgs.gov' |
| string | URL_PROTO = "/nhdplus/geoserver/ows?service=WCS&version=1.1.1&request=GetCoverage&identifier={coverage}&boundingBox={x1},{y1},{x2},{y2},urn:ogc:def:crs:{bbox_srs}&gridBaseCRS=urn:ogc:def:crs:EPSG::5070&gridOffsets={xoffset},{yoffset}&format=image/tiff&store=true" |
| string | DEFAULT_SRS = 'EPSG:5070' |
| string | DEFAULT_RASTER_RESAMPLE_METHOD = 'cubic' |
| list | RASTER_RESAMPLE_METHOD = ['bilinear', 'cubic', 'cubicspline'] |
| string | DEFAULT_COVERAGE = 'NED' |
| dictionary | COVERAGES |
| list | CONTENT_TYPE_ERRORS = ['text/html'] |
| def ecohydrolib.usgsdem.getDEMForBoundingBox | ( | config, | |
| outputDir, | |||
| outFilename, | |||
| bbox, | |||
| srs, | |||
coverage = DEFAULT_COVERAGE, |
|||
resx = None, |
|||
resy = None, |
|||
interpolation = DEFAULT_RASTER_RESAMPLE_METHOD, |
|||
scale = 1.0, |
|||
overwrite = True, |
|||
verbose = False, |
|||
outfp = sys.stdout |
|||
| ) |
Fetch U.S.
1/3 arcsecond DEM data hosted by U.S. Geological Survey using OGC WCS 1.1.1 query.
@note Adapted from code provided by dblodgett@usgs.gov.
@param config A Python ConfigParser (not currently used)
@param outputDir String representing the absolute/relative path of the directory into which output raster should be written
@param outFilename String representing the name of the raster file to be written
@param bbox Dict 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.
@param srs String representing the spatial reference of the raster to be returned.
@param coverage String representing the raster source from which to get the raster coverage. Must be one of: NHDPlus_hydroDEM, NED
@param resx Float representing the X resolution of the raster(s) to be returned
@param resy Float representing the Y resolution of the raster(s) to be returned
@param interpolation String representing interpolation method. Must be one of RASTER_RESAMPLE_METHOD. Defaults to DEFAULT_RASTER_RESAMPLE_METHOD.
@param scale Float representing factor by which to scale elevation data. Defaults to 1.0.
@param overwrite Boolean value indicating whether or not the file indicated by filename should be overwritten.
If False and filename exists, IOError exception will be thrown with errno.EEXIST
@param verbose Boolean True if detailed output information should be printed to outfp
@param outfp File-like object to which verbose output should be printed
@raise IOError if outputDir is not a writable directory
@raise IOError if outFilename already exists and overwrite is False (see above)
@raise Exception if there was an error making the WCS request
@return Tuple(True if raster data were fetched and False if not, URL of raster fetched)
| int ecohydrolib.usgsdem._BUFF_LEN = 4096 |
| list ecohydrolib.usgsdem.CONTENT_TYPE_ERRORS = ['text/html'] |
| dictionary ecohydrolib.usgsdem.COVERAGES |
| string ecohydrolib.usgsdem.DEFAULT_COVERAGE = 'NED' |
| string ecohydrolib.usgsdem.DEFAULT_RASTER_RESAMPLE_METHOD = 'cubic' |
| string ecohydrolib.usgsdem.DEFAULT_SRS = 'EPSG:5070' |
| string ecohydrolib.usgsdem.HOST = 'cida-test.er.usgs.gov' |
| list ecohydrolib.usgsdem.RASTER_RESAMPLE_METHOD = ['bilinear', 'cubic', 'cubicspline'] |
| string ecohydrolib.usgsdem.URL_PROTO = "/nhdplus/geoserver/ows?service=WCS&version=1.1.1&request=GetCoverage&identifier={coverage}&boundingBox={x1},{y1},{x2},{y2},urn:ogc:def:crs:{bbox_srs}&gridBaseCRS=urn:ogc:def:crs:EPSG::5070&gridOffsets={xoffset},{yoffset}&format=image/tiff&store=true" |
1.8.9.1