EcohydroLib  1.29
Functions | Variables
ecohydrolib.nlcd.daacquery Namespace Reference

Query NLCD data from ORNL Distributed Active Archive Center for Biogeochemical Dynamics. More...

Functions

def getNLCDForBoundingBox
 Fetch a NLCD land cover data from ORNL Distributed Active Archive Center for Biogeochemical Dynamics WCS-compliant web service. More...
 

Variables

dictionary SUPPORTED_COVERAGE
 
list SUPPORTED_FORMATS = ['GeoTIFF_BYTE']
 
string MIME_TYPE = 'image/tiff'
 
string INTERPOLATION = 'NEAREST'
 
string HOST = 'webmap.ornl.gov'
 
string URL_PROTO = '/ogcbroker/wcs?originator=SDAT&service=WCS&version=1.0.0&request=GetCoverage&coverage={coverage}&crs={crs}&bbox={bbox}&response_crs={response_crs}&resx={resx}&resy={resy}&format={format}&interpolation={interpolation}'
 

Detailed Description

Query NLCD data from ORNL Distributed Active Archive Center for Biogeochemical Dynamics.

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.

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

Function Documentation

def ecohydrolib.nlcd.daacquery.getNLCDForBoundingBox (   config,
  outputDir,
  outNLCDFilename,
  bbox,
  resx,
  resy,
  coverage = 'NLCD2006',
  srs = 'EPSG:4326',
  format = 'GeoTIFF_BYTE',
  overwrite = True 
)

Fetch a NLCD land cover data from ORNL Distributed Active Archive Center for Biogeochemical Dynamics WCS-compliant web service.

Will write any error returned by query to sys.stderr.

Parameters
configA Python ConfigParser (not currently used)
outputDirString representing the absolute/relative path of the directory into which output DEM should be written
outNLCDFilenameString representing the name of the NLCD raster file to be written
bboxDict representing the lat/long coordinates and spatial reference of the bounding box area for which the NLCD data are to be extracted. The following keys must be specified: minX, minY, maxX, maxY, srs.
resxFloat representing X resolution of NLCD data to be returned in units of srs
resyFloat representing Y resolution of NLCD data to be returned in units of srs
coverageString representing the NLCD version to get. Must be a value listed in SUPPORTED_COVERAGE
srsString representing the spatial reference of the raster to be returned.
formatString representing the type of the raster format to be returned. Must be a value listed in SUPPORTED_FORMATS
overwriteBoolean 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

IOError if outputDir is not a writable directory IOError if outNLCDFilename already exists and overwrite is False (see above)

Returns
Tuple(True if DEM data were fetched and False if not, URL of DEM fetched)

Variable Documentation

string ecohydrolib.nlcd.daacquery.HOST = 'webmap.ornl.gov'
string ecohydrolib.nlcd.daacquery.INTERPOLATION = 'NEAREST'
string ecohydrolib.nlcd.daacquery.MIME_TYPE = 'image/tiff'
dictionary ecohydrolib.nlcd.daacquery.SUPPORTED_COVERAGE
Initial value:
1 = { 'NLCD2001': '10009_1',
2  'NLCD2006': '10009_14' }
list ecohydrolib.nlcd.daacquery.SUPPORTED_FORMATS = ['GeoTIFF_BYTE']
string ecohydrolib.nlcd.daacquery.URL_PROTO = '/ogcbroker/wcs?originator=SDAT&service=WCS&version=1.0.0&request=GetCoverage&coverage={coverage}&crs={crs}&bbox={bbox}&response_crs={response_crs}&resx={resx}&resy={resy}&format={format}&interpolation={interpolation}'