Mast head image

Ecological Site by AOI

This script retrieves the Ecological site ID and Name for a designated AOI.


Text highlighted in yellow in the example script can be changed for a particular AOI By changing the coordinate pairs. Examples can be found on the Tips page.

Tips Page

Copy the example script below and paste it into the query page on the Soil Data Access site.

Soil Data Access Query Page

Example Script

SELECT L.areasymbol AS Area_symbol, L.areaname AS Area_name, M.musym AS Map_unit_symbol,

M.muname AS Map_unit_name, M.mukey AS MUKEY, C.compname AS Component_name, C.comppct_r AS Component_percentage,

CE.ecoclassname AS Eco_class_name, CE.ecoclassid AS Eco_site_ID

FROM legend AS L

INNER JOIN mapunit AS M ON M.Lkey = L.Lkey

AND mukey IN (SELECT mukey FROM SDA_Get_Mukey_from_intersection_with_WktWgs84(

'polygon ((-97.4 28.5, -97.4 28.6,-97.3 28.6,-97.3 28.5,-97.4 28.5))'))

INNER JOIN component AS C ON M.mukey=C.mukey AND compkind = 'series'

INNER JOIN coecoclass AS CE ON C.cokey = CE.cokey

Example Table Output

Description of tables and columns can be found on this link: Table and Column Descriptions

Area_symbol Area_name Map_unit_symbol Map_unit_name MUKEY Component_name Component_percentage Eco_class_name Eco_site_ID
TX175 Goliad County, Texas OdA Odem-Riverwash complex, 0 to 1 percent, frequently flooded 2436802 Odem 50 Loamy Bottomland 25-44" PZ R150AY534TX
TX175 Goliad County, Texas CrA Clareville sandy clay loam, 0 to 1 percent slopes, rarely flooded 2436803 Clareville 90 Clay Loam 25-35" PZ R083AY629TX
TX175 Goliad County, Texas RnB Raisin fine sandy loam, 1 to 3 percent slopes 2436806 Raisin 90 Sandy Loam 25-35" PZ R083AY407TX



Helping People Help the Land

USDA is an equal opportunity provider, employer, and lender.