Function reference

Client

Classes for interacting with the SDA service.

client.SDAClient Async HTTP client for Soil Data Access web service.

Querying

Classes and functions for building and executing queries.

query.Query Builder for SQL queries against Soil Data Access.
query_templates Query templates for common Soil Data Access query patterns.
convenience.get_mapunit_by_point Get map unit data at a specific point location.
convenience.get_mapunit_by_areasymbol Get map unit data by survey area symbol (legend).
convenience.get_mapunit_by_bbox Get map unit data within a bounding box.
convenience.get_sacatalog Get survey area catalog (sacatalog) data.

Fluent Query Methods

Fluent interface methods for building SQL queries.

query.Query.select Set the SELECT clause.
query.Query.from_ Set the FROM clause.
query.Query.where Add a WHERE condition.
query.Query.join Add a JOIN clause.
query.Query.inner_join Add an INNER JOIN clause.
query.Query.left_join Add a LEFT JOIN clause.
query.Query.order_by Set the ORDER BY clause.
query.Query.limit Set the LIMIT (uses TOP in SQL Server).

Fetching

Functions for bulk data fetching.

fetch.fetch_by_keys Fetch data from a table using a list of key values with pagination (PRIMARY INTERFACE).
fetch.get_mukey_by_areasymbol Get all mukeys for given area symbols (TIER 4 - Helper).
fetch.get_cokey_by_mukey Get all cokeys for given mukeys (TIER 4 - Helper).

Spatial

Functions for spatial queries.

spatial.spatial_query Execute a spatial query against SSURGO data (CANONICAL FUNCTION).
spatial.point_query Simplified point-based spatial query.
spatial.bbox_query Simplified bounding box-based spatial query.

AWDB Integration

Functions for accessing NRCS monitoring data.

awdb.client.AWDBClient Async client for accessing data via the NRCS AWDB REST API.
awdb.convenience.discover_stations Discover stations using advanced filtering criteria with wildcard support.
awdb.convenience.discover_stations_nearby Discover AWDB stations near a geographic location.
awdb.convenience.get_property_data_near Get time-series data for a property from the nearest monitoring station.

Metadata

Classes and functions for parsing survey area metadata.

metadata.SurveyMetadata Represents parsed metadata for a soil survey area.
metadata.parse_survey_metadata Parse XML metadata from sacatalog.fgdcmetadata column.
metadata.extract_metadata_summary Extract a summary of key metadata fields.

Response

Class for handling responses from the SDA service.

response.SDAResponse Represents a response from the Soil Data Access web service.

Exceptions

Custom exception classes.

exceptions.SoilDBError Base exception for all soildb errors.
exceptions.SDAConnectionError Raised when there are connection issues with the SDA service.
exceptions.SDAQueryError Raised when a query fails or returns invalid results.
exceptions.SDAMaintenanceError Raised when the SDA service is under maintenance.
exceptions.SDAResponseError Raised when SDA returns an invalid or unexpected response format.
metadata.MetadataParseError Raised when XML metadata parsing fails.