EcohydroLib  1.29
Functions | Variables
ecohydrolib.geosciaus.demwcs Namespace Reference

Query DEM data from WCS service provided by Geoscience Australia. More...

Functions

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

Variables

string COVERAGE_SRTM_1DEG_AUS = 'dem_1s'
 
string COVERAGE_SRTM_1DEG_AUS_HYDRO = 'dem_h_1s'
 
string COVERAGE_SRTM_1DEG_AUS_SMOOTH = 'dem_s_1s'
 
list SUPPORTED_COVERAGE = [COVERAGE_SRTM_1DEG_AUS, COVERAGE_SRTM_1DEG_AUS_HYDRO, COVERAGE_SRTM_1DEG_AUS_SMOOTH]
 
dictionary COVERAGE_DESC
 
string FORMAT_GEOTIFF = 'GeoTIFF'
 
string FORMAT_NITF = 'NITF'
 
string FORMAT_HDF = 'HDF'
 
list SUPPORTED_FORMATS = [FORMAT_GEOTIFF, FORMAT_NITF, FORMAT_HDF]
 
dictionary MIME_TYPE
 
string HOST = 'www.ga.gov.au'
 
string URL_PROTO = '/gisimg/services/topography/{coverage}/ImageServer/WCSServer?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&COVERAGE=1&FORMAT={format}&BBOX={bbox}&RESX=0.000277777777778&RESY=0.000277777777778&CRS={crs}&RESPONSE_CRS={response_crs}&INTERPOLATION=bilinear&Band=1'
 

Detailed Description

Query DEM data from WCS service provided by Geoscience Australia.

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

Copyright (c) 2014, 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.geosciaus.demwcs.getDEMForBoundingBox (   config,
  outputDir,
  outDEMFilename,
  bbox,
  coverage = COVERAGE_SRTM_1DEG_AUS,
  srs = 'EPSG:4326',
  fmt = 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

dictionary ecohydrolib.geosciaus.demwcs.COVERAGE_DESC
Initial value:
1 = {COVERAGE_SRTM_1DEG_AUS: '1 second SRTM Digital Elevation Model of Australia',
2  COVERAGE_SRTM_1DEG_AUS_HYDRO: '1 second SRTM Digital Elevation Model - Hydrologically Enforced',
3  COVERAGE_SRTM_1DEG_AUS_SMOOTH: '1 second SRTM Digital Elevation Model - Smoothed'}
string ecohydrolib.geosciaus.demwcs.COVERAGE_SRTM_1DEG_AUS = 'dem_1s'
string ecohydrolib.geosciaus.demwcs.COVERAGE_SRTM_1DEG_AUS_HYDRO = 'dem_h_1s'
string ecohydrolib.geosciaus.demwcs.COVERAGE_SRTM_1DEG_AUS_SMOOTH = 'dem_s_1s'
string ecohydrolib.geosciaus.demwcs.FORMAT_GEOTIFF = 'GeoTIFF'
string ecohydrolib.geosciaus.demwcs.FORMAT_HDF = 'HDF'
string ecohydrolib.geosciaus.demwcs.FORMAT_NITF = 'NITF'
string ecohydrolib.geosciaus.demwcs.HOST = 'www.ga.gov.au'
dictionary ecohydrolib.geosciaus.demwcs.MIME_TYPE
Initial value:
1 = {FORMAT_GEOTIFF: 'image/tiff',
2  FORMAT_NITF: 'application/x-nitf',
3  FORMAT_HDF: 'application/x-hdf'
4  }
list ecohydrolib.geosciaus.demwcs.SUPPORTED_COVERAGE = [COVERAGE_SRTM_1DEG_AUS, COVERAGE_SRTM_1DEG_AUS_HYDRO, COVERAGE_SRTM_1DEG_AUS_SMOOTH]
list ecohydrolib.geosciaus.demwcs.SUPPORTED_FORMATS = [FORMAT_GEOTIFF, FORMAT_NITF, FORMAT_HDF]
string ecohydrolib.geosciaus.demwcs.URL_PROTO = '/gisimg/services/topography/{coverage}/ImageServer/WCSServer?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&COVERAGE=1&FORMAT={format}&BBOX={bbox}&RESX=0.000277777777778&RESY=0.000277777777778&CRS={crs}&RESPONSE_CRS={response_crs}&INTERPOLATION=bilinear&Band=1'