EcohydroLib
1.29
|
Make tabular queries against USDA Soil Data Mart SOAP web service interface. More...
Functions | |
def | strListToString (strList) |
Converts a Python list of string values into a string containing quoted, comma separated representation of the list. More... | |
def | computeWeightedAverageKsatClaySandSilt (soilAttrTuple) |
Computes weighted average for Ksat, clay/silt/sand for a SSURGO mukey based on values for each component in the mukey; weights based on component.comppct_r. More... | |
def | joinSSURGOAttributesToFeaturesByMUKEY_GeoJSON (geojson, typeName, ssurgoAttributes) |
Join SSURGO tabular attributes to MapunitPoly or MapunitPolyExtended features based on MUKEY. More... | |
def | getParentMatKsatTexturePercentClaySiltSandForComponentsInMUKEYs (mukeyList) |
Query USDA soil datamart tabular service for ksat, texture, % clay, % silt, % sand for all components in the specified map units. More... | |
Variables | |
int | _BUFF_LEN = 4096 |
string | ATTRIBUTE_NAMESPACE = 'ms' |
list | ATTRIBUTE_LIST |
list | ATTRIBUTE_LIST_NUMERIC |
dictionary | DERIVED_ATTRIBUTES = { 'drnWatCont': 'porosity - fieldCap' } |
Make tabular queries against USDA Soil Data Mart SOAP web service interface.
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.
def ecohydrolib.ssurgo.attributequery.computeWeightedAverageKsatClaySandSilt | ( | soilAttrTuple | ) |
Computes weighted average for Ksat, clay/silt/sand for a SSURGO mukey based on values for each component in the mukey; weights based on component.comppct_r.
soilAttrTuple | Tuple returned from getParentMatKsatTexturePercentClaySiltSandForComponentsInMUKEYs |
def ecohydrolib.ssurgo.attributequery.getParentMatKsatTexturePercentClaySiltSandForComponentsInMUKEYs | ( | mukeyList | ) |
Query USDA soil datamart tabular service for ksat, texture, % clay, % silt, % sand for all components in the specified map units.
mukeyList | List of strings representing the MUKEY of each map unit for which we would like to query attributes. |
socket.error if there was an error reading the data from the web service Exception if webservice returned code other than 200
def ecohydrolib.ssurgo.attributequery.joinSSURGOAttributesToFeaturesByMUKEY_GeoJSON | ( | geojson, | |
typeName, | |||
ssurgoAttributes | |||
) |
Join SSURGO tabular attributes to MapunitPoly or MapunitPolyExtended features based on MUKEY.
geojson | JSON object representing SSURGO MapunitPolyExtended or MapunitPoly features |
typeName | String of either 'MapunitPoly' or 'MapunitPolyExtended' |
ssurgoAttributes | Tuple containing two lists: (1) list of column names; (2) list of column values. Assumes the following column names and order: ['mukey', 'avgKsat', 'avgClay', 'avgSilt', 'avgSand', 'avgPorosity'] |
def ecohydrolib.ssurgo.attributequery.strListToString | ( | strList | ) |
Converts a Python list of string values into a string containing quoted, comma separated representation of the list.
strList | List of strings |
int ecohydrolib.ssurgo.attributequery._BUFF_LEN = 4096 |
list ecohydrolib.ssurgo.attributequery.ATTRIBUTE_LIST |
list ecohydrolib.ssurgo.attributequery.ATTRIBUTE_LIST_NUMERIC |
string ecohydrolib.ssurgo.attributequery.ATTRIBUTE_NAMESPACE = 'ms' |
dictionary ecohydrolib.ssurgo.attributequery.DERIVED_ATTRIBUTES = { 'drnWatCont': 'porosity - fieldCap' } |