Skip to content

SDA_spatialQuery: return nationalmusym#402

Merged
brownag merged 2 commits into
masterfrom
sda-spatial-nmusym
Aug 13, 2025
Merged

SDA_spatialQuery: return nationalmusym#402
brownag merged 2 commits into
masterfrom
sda-spatial-nmusym

Conversation

@brownag

@brownag brownag commented Aug 13, 2025

Copy link
Copy Markdown
Member

After

library(soilDB)
aoi <- sf::st_as_sfc(sf::st_bbox(c(
    xmin = -120.85,
    xmax = -120.775,
    ymin = 37.975,
    ymax = 38.0
), crs = 4326))

# Query SDA for map unit polygons cropped to the AOI
soil_polygons <- SDA_spatialQuery(
    aoi, 
    what = "mupolygon"
)
soil_polygons
#> Simple feature collection with 46 features and 3 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -120.9233 ymin: 37.91407 xmax: -120.7412 ymax: 38.0222
#> Geodetic CRS:  WGS 84
#> First 10 features:
#>      mukey     area_ac nationalmusym                           geom
#> 1  1403432    5.402344         2w8bm POLYGON ((-120.8315 37.9853...
#> 2  2924958   84.229770         2rx24 POLYGON ((-120.8498 37.9994...
#> 3  1605511  517.139158         2x8l9 POLYGON ((-120.8454 37.9730...
#> 4  1403418 1647.514959         1j3ck POLYGON ((-120.9233 37.9183...
#> 5  1403439  216.854306         2x8l8 POLYGON ((-120.8488 38.0086...
#> 6  1540892  842.104366         2xhkd POLYGON ((-120.8351 37.9713...
#> 7  1403432    8.221394         2w8bm POLYGON ((-120.8343 37.9898...
#> 8  1403439  203.075091         2x8l8 POLYGON ((-120.8443 37.9686...
#> 9  1605509   51.306804         2x8lb POLYGON ((-120.8276 37.9851...
#> 10 1403409  151.149130         1j3c8 POLYGON ((-120.8499 37.9666...

Before

library(soilDB)
aoi <- sf::st_as_sfc(sf::st_bbox(c(
    xmin = -120.85,
    xmax = -120.775,
    ymin = 37.975,
    ymax = 38.0
), crs = 4326))

# Query SDA for map unit polygons cropped to the AOI
soil_polygons <- SDA_spatialQuery(
    aoi, 
    what = "mupolygon"
)
soil_polygons
#> Simple feature collection with 46 features and 2 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -120.9233 ymin: 37.91407 xmax: -120.7412 ymax: 38.0222
#> Geodetic CRS:  WGS 84
#> First 10 features:
#>      mukey     area_ac                           geom
#> 1  1403432    5.402344 POLYGON ((-120.8315 37.9853...
#> 2  2924958   84.229770 POLYGON ((-120.8498 37.9994...
#> 3  1605511  517.139158 POLYGON ((-120.8454 37.9730...
#> 4  1403418 1647.514959 POLYGON ((-120.9233 37.9183...
#> 5  1403439  216.854306 POLYGON ((-120.8488 38.0086...
#> 6  1540892  842.104366 POLYGON ((-120.8351 37.9713...
#> 7  1403432    8.221394 POLYGON ((-120.8343 37.9898...
#> 8  1403439  203.075091 POLYGON ((-120.8443 37.9686...
#> 9  1605509   51.306804 POLYGON ((-120.8276 37.9851...
#> 10 1403409  151.149130 POLYGON ((-120.8499 37.9666...

@brownag brownag force-pushed the sda-spatial-nmusym branch from ccbc06f to c677ffe Compare August 13, 2025 17:21
@brownag brownag self-assigned this Aug 13, 2025
@brownag brownag merged commit 598049d into master Aug 13, 2025
5 checks passed
@brownag brownag deleted the sda-spatial-nmusym branch August 13, 2025 17:59
brownag added a commit that referenced this pull request Aug 14, 2025
brownag added a commit that referenced this pull request Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant