EcohydroLib  1.29
Functions | Variables
ecohydrolib.wcs4dem.demquery Namespace Reference

Query NASA EOS Education Alliance (NEHEA) GeoBrain for DEM data. More...

Functions

def getDEMForBoundingBox
 Fetch a digital elevation model (DEM) from the GeoBrain WCS4DEM WCS-compliant web service. More...
 

Variables

string COVERAGE_NED_30m_USA = 'NED_30m_USA'
 
string COVERAGE_SRTM_30m_USA = 'SRTM_30m_USA'
 
string COVERAGE_SRTM_90m_USA = 'SRTM_90m_Global'
 
string COVERAGE_GTOPO_30arc_GLOBAL = 'GTOPO_30arc_Global'
 
list SUPPORTED_COVERAGE = [COVERAGE_NED_30m_USA, COVERAGE_SRTM_30m_USA, COVERAGE_SRTM_90m_USA, COVERAGE_GTOPO_30arc_GLOBAL]
 
string FORMAT_GEOTIFF = 'image/geotiff'
 
string FORMAT_NETCDF = 'image/netcdf'
 
string FORMAT_PNG = 'image/PNG'
 
string FORMAT_JPEG = 'image/JPEG'
 
string FORMAT_JP2000 = 'image/JPEG2000'
 
string FORMAT_HDF4 = 'image/HDF4IMAGE'
 
list SUPPORTED_FORMATS = [FORMAT_GEOTIFF, FORMAT_NETCDF, FORMAT_PNG, FORMAT_JPEG, FORMAT_JP2000, FORMAT_HDF4]
 
string MIME_TYPE = 'application/image'
 
string HOST = 'geobrain.laits.gmu.edu'
 
string URL_PROTO = '/cgi-bin/gbwcs-dem?service=wcs&version=1.0.0&request=getcoverage&coverage={coverage}&crs={crs}&bbox={bbox}&response_crs={response_crs}&format={format}&store={store}'
 

Detailed Description

Query NASA EOS Education Alliance (NEHEA) GeoBrain for DEM data.

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.wcs4dem.demquery.getDEMForBoundingBox (   config,
  outputDir,
  outDEMFilename,
  bbox,
  coverage = COVERAGE_NED_30m_USA,
  srs = 'EPSG:4326',
  format = FORMAT_GEOTIFF,
  overwrite = True 
)

Fetch a digital elevation model (DEM) from the GeoBrain WCS4DEM 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
outDEMFilenameString representing the name of the DEM file to be written
bboxDict representing the lat/long coordinates and spatial reference of the bounding box area for which the DEM is to be extracted. The following keys must be specified: minX, minY, maxX, maxY, srs.
coverageString representing the DEM source from which to get the DEM coverage. Must be a value listed in SUPPORTED_COVERAGE
srsString representing the spatial reference of the raster to be returned.
formatString representing the MIME 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 outDEMFilename 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.wcs4dem.demquery.COVERAGE_GTOPO_30arc_GLOBAL = 'GTOPO_30arc_Global'
string ecohydrolib.wcs4dem.demquery.COVERAGE_NED_30m_USA = 'NED_30m_USA'
string ecohydrolib.wcs4dem.demquery.COVERAGE_SRTM_30m_USA = 'SRTM_30m_USA'
string ecohydrolib.wcs4dem.demquery.COVERAGE_SRTM_90m_USA = 'SRTM_90m_Global'
string ecohydrolib.wcs4dem.demquery.FORMAT_GEOTIFF = 'image/geotiff'
string ecohydrolib.wcs4dem.demquery.FORMAT_HDF4 = 'image/HDF4IMAGE'
string ecohydrolib.wcs4dem.demquery.FORMAT_JP2000 = 'image/JPEG2000'
string ecohydrolib.wcs4dem.demquery.FORMAT_JPEG = 'image/JPEG'
string ecohydrolib.wcs4dem.demquery.FORMAT_NETCDF = 'image/netcdf'
string ecohydrolib.wcs4dem.demquery.FORMAT_PNG = 'image/PNG'
string ecohydrolib.wcs4dem.demquery.HOST = 'geobrain.laits.gmu.edu'
string ecohydrolib.wcs4dem.demquery.MIME_TYPE = 'application/image'
list ecohydrolib.wcs4dem.demquery.SUPPORTED_COVERAGE = [COVERAGE_NED_30m_USA, COVERAGE_SRTM_30m_USA, COVERAGE_SRTM_90m_USA, COVERAGE_GTOPO_30arc_GLOBAL]
list ecohydrolib.wcs4dem.demquery.SUPPORTED_FORMATS = [FORMAT_GEOTIFF, FORMAT_NETCDF, FORMAT_PNG, FORMAT_JPEG, FORMAT_JP2000, FORMAT_HDF4]
string ecohydrolib.wcs4dem.demquery.URL_PROTO = '/cgi-bin/gbwcs-dem?service=wcs&version=1.0.0&request=getcoverage&coverage={coverage}&crs={crs}&bbox={bbox}&response_crs={response_crs}&format={format}&store={store}'