Skip to content

Commit

Permalink
Merge pull request #272 from microsoft/guhidalgo/naip2022
Browse files Browse the repository at this point in the history
Update dataset NAIP 2022
  • Loading branch information
ghidalgo3 authored Jan 18, 2024
2 parents 1c49af5 + 4c64af4 commit 833560e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
8 changes: 7 additions & 1 deletion datasets/naip/collection/description.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
The [National Agriculture Imagery Program](https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/) (NAIP) provides U.S.-wide, high-resolution aerial imagery, with four spectral bands (R, G, B, IR). NAIP is administered by the [Aerial Field Photography Office](https://www.fsa.usda.gov/programs-and-services/aerial-photography/) (AFPO) within the [US Department of Agriculture](https://www.usda.gov/) (USDA). Data are captured at least once every three years for each state. This dataset represents NAIP data from 2010-present, in [cloud-optimized GeoTIFF](https://www.cogeo.org/) format.
The [National Agriculture Imagery Program](https://www.fsa.usda.gov/programs-and-services/aerial-photography/imagery-programs/naip-imagery/) (NAIP)
provides U.S.-wide, high-resolution aerial imagery, with four spectral bands (R, G, B, IR).
NAIP is administered by the [Aerial Field Photography Office](https://www.fsa.usda.gov/programs-and-services/aerial-photography/) (AFPO)
within the [US Department of Agriculture](https://www.usda.gov/) (USDA).
Data are captured at least once every three years for each state.
This dataset represents NAIP data from 2010-present, in [cloud-optimized GeoTIFF](https://www.cogeo.org/) format.
You can visualize the coverage of current and past collections [here](https://naip-usdaonline.hub.arcgis.com/).
3 changes: 2 additions & 1 deletion datasets/naip/collection/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
},
"summaries": {
"gsd": [
0.3,
0.6,
1.0
],
Expand Down Expand Up @@ -123,7 +124,7 @@
"interval": [
[
"2010-01-01T00:00:00Z",
"2021-12-31T00:00:00Z"
"2022-12-31T00:00:00Z"
]
]
}
Expand Down
2 changes: 1 addition & 1 deletion datasets/naip/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
stactools-naip==0.3.1
stactools-naip==0.5.0
13 changes: 11 additions & 2 deletions datasets/naip/test_naip.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"href",
[
"blob://naipeuwest/naip/v002/wa/2021/wa_060cm_2021/45116/m_4511601_ne_11_060_20210629.tif", # noqa: E501
"blob://naipeuwest/naip/v002/co/2021/co_060cm_2021/37102/63/m_3710263_sw_13_060_20210729.tif" # noqa: E501
"blob://naipeuwest/naip/v002/co/2021/co_060cm_2021/37102/63/m_3710263_sw_13_060_20210729.tif", # noqa: E501
"blob://naipeuwest/naip/v002/ca/2022/ca_060cm_2022/41120/m_4112001_sw_10_060_20220716.tif", # noqa: E501
"blob://naipeuwest/naip/v002/ca/2022/ca_030cm_2022/41120/m_4112001_ne_10_030_20220723.tif", # noqa: E501
],
)
def test_naip(href):
def test_naip(href: str) -> None:
storage_factory = StorageFactory()
(item,) = NAIPCollection.create_item(href, storage_factory, upload=False)
item.validate()
Expand All @@ -23,3 +25,10 @@ def test_naip(href):
if "/63/" in href:
# verify that the new item ID includes both area & subarea
assert item.id == "co_m_3710263_sw_13_060_20210729"
if "/ca/2022/ca_060cm" in href:
# verify that the new item ID includes both area & subarea
assert item.id == "ca_m_4112001_sw_10_060_20220716"
if "030cm" in href:
# verify that the new item ID includes both area & subarea
assert item.id == "ca_m_4112001_ne_10_030_20220723"
assert item.common_metadata.gsd == 0.3

0 comments on commit 833560e

Please sign in to comment.