EcohydroLib  1.29
Functions | Variables
ecohydrolib.usgs.nlcdwcs Namespace Reference

Query NLCD datasets from WCS service provided by U.S. More...

Functions

def getNLCDRasterDataForBoundingBox
 Download NLCD rasters from http://raster.nationalmap.gov/arcgis/rest/services/LandCover/USGS_EROS_LandCover_NLCD/MapServer. More...
 

Variables

string FORMAT_GEOTIFF = 'GeoTIFF'
 
tuple FORMATS = set([FORMAT_GEOTIFF])
 
dictionary MIME_TYPE = {FORMAT_GEOTIFF: 'image/GeoTIFF'}
 
dictionary FORMAT_EXT = {FORMAT_GEOTIFF: 'tif'}
 
string URL_BASE = "http://raster.nationalmap.gov/arcgis/services/LandCover/USGS_EROS_LandCover_NLCD/MapServer/WCSServer"
 
string DC_PUBLISHER = "http://raster.nationalmap.gov/arcgis/rest/services/LandCover/USGS_EROS_LandCover_NLCD/MapServer"
 
dictionary COVERAGES
 
dictionary USER_COVERAGES
 
dictionary LC_TYPE_TO_COVERAGE
 
string DEFAULT_COVERAGE = 'Land_Cover_2011_CONUS_2'
 
dictionary INTERPOLATION_METHODS = {'near': 'NEAREST'}
 

Detailed Description

Query NLCD datasets from WCS service provided by U.S.

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

Function Documentation

def ecohydrolib.usgs.nlcdwcs.getNLCDRasterDataForBoundingBox (   config,
  outputDir,
  bbox,
  coverage = DEFAULT_COVERAGE,
  filename = 'NLCD',
  srs = 'EPSG:4326',
  resx = 0.000277777777778,
  resy = 0.000277777777778,
  interpolation = 'near',
  fmt = FORMAT_GEOTIFF,
  overwrite = False,
  verbose = False,
  outfp = sys.stdout 
)

Download NLCD rasters from http://raster.nationalmap.gov/arcgis/rest/services/LandCover/USGS_EROS_LandCover_NLCD/MapServer.

Parameters
configA Python ConfigParser (not currently used)
outputDirString representing the absolute/relative path of the directory into which output raster should be written
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.
srsString representing the spatial reference of the raster to be returned.
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 resampling method to use. Must be one of spatialdatalib.utils.RASTER_RESAMPLE_METHOD.
fmtString representing format of raster file. Must be one of FORMATS.
overwriteBoolean True if existing data should be overwritten
verboseBoolean True if detailed output information should be printed to outfp
outfpFile-like object to which verbose output should be printed
Returns
A dictionary mapping soil property names to soil property file path and WCS URL, i.e. dict[soilPropertyName] = (soilPropertyFilePath, WCS URL)
Exceptions
Exceptionif coverage is not known
Exceptionif interpolation method is not known
Exceptionif fmt is not a known format
Exceptionif output already exists by overwrite is False

Variable Documentation

dictionary ecohydrolib.usgs.nlcdwcs.COVERAGES
Initial value:
1 = {'Land_Cover_2011_AK_1': '1',
2  'Land_Cover_2011_CONUS_2': '2',
3  'Impervious_Surface_2011_CONUS_3': '3',
4  'Canopy_2011_CONUS_4': '4',
5  'Land_Cover_2006_CONUS_5': '5',
6  'Impervious_Surface_2006_CONUS_6': '6',
7  'Land_Cover_2001_AK_7': '7',
8  'Land_Cover_2001_HI_8': '8',
9  'Land_Cover_2001_PR_9': '9',
10  'Land_Cover_2001_CONUS_10': '10',
11  'Impervious_Surface_2001_AK_11': '11',
12  'Impervious_Surface_2001_HI_12': '12',
13  'Impervious_Surface_2001_CONUS_13': '13',
14  'Impervious_Surface_2001_PR_14': '14',
15  'Canopy_2001_AK_15': '15',
16  'Canopy_2001_HI_16': '16',
17  'Canopy_2001_CONUS_17': '17',
18  'Canopy_2001_PR_18': '18',
19  'Land_Cover_1992_19': '19'
20  }
string ecohydrolib.usgs.nlcdwcs.DC_PUBLISHER = "http://raster.nationalmap.gov/arcgis/rest/services/LandCover/USGS_EROS_LandCover_NLCD/MapServer"
string ecohydrolib.usgs.nlcdwcs.DEFAULT_COVERAGE = 'Land_Cover_2011_CONUS_2'
dictionary ecohydrolib.usgs.nlcdwcs.FORMAT_EXT = {FORMAT_GEOTIFF: 'tif'}
string ecohydrolib.usgs.nlcdwcs.FORMAT_GEOTIFF = 'GeoTIFF'
tuple ecohydrolib.usgs.nlcdwcs.FORMATS = set([FORMAT_GEOTIFF])
dictionary ecohydrolib.usgs.nlcdwcs.INTERPOLATION_METHODS = {'near': 'NEAREST'}
dictionary ecohydrolib.usgs.nlcdwcs.LC_TYPE_TO_COVERAGE
Initial value:
1 = {'NLCD2006': 'Land_Cover_2006_CONUS_5',
2  'NLCD2011': 'Land_Cover_2011_CONUS_2'}
dictionary ecohydrolib.usgs.nlcdwcs.MIME_TYPE = {FORMAT_GEOTIFF: 'image/GeoTIFF'}
string ecohydrolib.usgs.nlcdwcs.URL_BASE = "http://raster.nationalmap.gov/arcgis/services/LandCover/USGS_EROS_LandCover_NLCD/MapServer/WCSServer"
dictionary ecohydrolib.usgs.nlcdwcs.USER_COVERAGES
Initial value:
1 = {'Land_Cover_2011_CONUS_2': '2',
2  'Land_Cover_2006_CONUS_5': '5'}