EcohydroLib  1.29
Functions | Variables
ecohydrolib.wcslib Namespace Reference

Make WCS 1.1.1 query for DEM data hosted by U.S. More...

Functions

def getRasterForBoundingBox
 Fetch a rater from WCS-compliant web service. More...
 

Variables

list CONTENT_TYPE_ERRORS = ['text/xml', 'application/vnd.ogc.se_xml;charset=ISO-8859-1']
 
string _DEFAULT_CRS = 'EPSG:4326'
 
int _BUFF_LEN = 4096
 

Detailed Description

Make WCS 1.1.1 query for DEM data hosted by U.S.

Make WCS query for a raster data set.

Geological Survey

This software is provided free of charge under the New BSD License. Please see the following license information:

Copyright (c) 2015, 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

from future import division

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.wcslib.getRasterForBoundingBox (   config,
  outputDir,
  outFilename,
  host,
  urlProto,
  mimeType,
  bbox,
  coverage,
  srs,
  format,
  response_crs = None,
  store = None,
  resx = None,
  resy = None,
  interpolation = None,
  overwrite = True 
)

Fetch a rater from 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 raster should be written
outFilenameString representing the name of the raster file to be written
hostString representing the host (e.g. 'webmap.ornl.gov', 'geobrain.laits.gmu.edu')
urlProtoString representing WCS service URL, must contain the following replacement fields: coverage, crs, bbox, format. May have the following fields: response_srs, store, resx, resy, interpolation
mimeTypeString representing the MIME type expected for the response data
bboxDict 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.
coverageString representing the raster source from which to get the raster 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
response_srsString representing the spatial reference of the raster to be returned. Present for compatibility purposes and is ignored; only srs is used.
storeString present for compatibility with WCS4DEM.
resxFloat representing the X resolution of the raster(s) to be returned
resyFloat representing the Y resolution of the raster(s) to be returned
interpolationString representing interpolation method.
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 outFilename already exists and overwrite is False (see above)

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

Variable Documentation

int ecohydrolib.wcslib._BUFF_LEN = 4096
string ecohydrolib.wcslib._DEFAULT_CRS = 'EPSG:4326'
list ecohydrolib.wcslib.CONTENT_TYPE_ERRORS = ['text/xml', 'application/vnd.ogc.se_xml;charset=ISO-8859-1']