Skip to content

Commit ef49c8f

Browse files
authored
NAIP 2023 Dataset (#317)
* NAIP 2023 Dataset * Collection metadata update
1 parent b108932 commit ef49c8f

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

datasets/naip/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# NAIP
22

3+
## Collection Metadata Update
4+
5+
Run this if you need to update the collection STAC item without ingesting asset items.
6+
7+
```shell
8+
pctasks dataset ingest-collection -d datasets/naip/dataset.yaml --submit -a registry pccomponents -arg year '2023'
9+
```
10+
311
## Running
412

513
Provide the year (or a regex of years) you want to process.
614

715
```shell
8-
$ pctasks dataset process-items --dataset datasets/naip/dataset.yaml test-2023-04-24 --arg year '(2021|2022)'
16+
pctasks dataset process-items --dataset datasets/naip/dataset.yaml my-chunkset-id --arg year '(2021|2022)' --arg registry pccomponents.azurecr.io --submit
917
```
1018

1119
## Docker container

datasets/naip/collection/template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
"interval": [
143143
[
144144
"2010-01-01T00:00:00Z",
145-
"2022-12-31T00:00:00Z"
145+
"2023-12-31T00:00:00Z"
146146
]
147147
]
148148
}

datasets/naip/test_naip.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"blob://naipeuwest/naip/v002/co/2021/co_060cm_2021/37102/63/m_3710263_sw_13_060_20210729.tif", # noqa: E501
1111
"blob://naipeuwest/naip/v002/ca/2022/ca_060cm_2022/41120/m_4112001_sw_10_060_20220716.tif", # noqa: E501
1212
"blob://naipeuwest/naip/v002/ca/2022/ca_030cm_2022/41120/m_4112001_ne_10_030_20220723.tif", # noqa: E501
13+
"blob://naipeuwest/naip/v002/az/2023/az_030cm_2023/31109/m_3110901_ne_12_030_20231015_20240119.tif", # noqa: E501
1314
],
1415
)
1516
def test_naip(href: str) -> None:
@@ -22,13 +23,15 @@ def test_naip(href: str) -> None:
2223
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
2324
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
2425
]
25-
if "/63/" in href:
26+
if "/2023/" in href:
27+
assert item.id == "az_m_3110901_ne_12_030_20231015_20240119"
28+
elif "/63/" in href:
2629
# verify that the new item ID includes both area & subarea
2730
assert item.id == "co_m_3710263_sw_13_060_20210729"
28-
if "/ca/2022/ca_060cm" in href:
31+
elif "/ca/2022/ca_060cm" in href:
2932
# verify that the new item ID includes both area & subarea
3033
assert item.id == "ca_m_4112001_sw_10_060_20220716"
31-
if "030cm" in href:
34+
elif "030cm" in href:
3235
# verify that the new item ID includes both area & subarea
3336
assert item.id == "ca_m_4112001_ne_10_030_20220723"
3437
assert item.common_metadata.gsd == 0.3

0 commit comments

Comments
 (0)