Skip to content

Commit 0224b1c

Browse files
authored
feat: Add NLCD example (#16)
* feat: Add NLCD example * Move maxar data into subfolder
1 parent 4780c42 commit 0224b1c

9 files changed

+90
-82
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ Run `pixi run generate`.
3131

3232
## Image Sources
3333

34-
### Vantor (formerly Maxar)
35-
36-
Some test images are copyright [Vantor](https://vantor.com/), provided under a [Creative Commons Attribution Non Commercial](https://spdx.org/licenses/CC-BY-NC-4.0.html) license via the [Maxar Open Data Program](https://registry.opendata.aws/maxar-open-data/).
34+
Images in the `real_data/` folder are sourced from various open data programs. See the individual README files in each subfolder for details.

real_data/maxar_opendata_yellowstone_visual.md

Lines changed: 0 additions & 78 deletions
This file was deleted.

real_data/nlcd/nlcd_landcover.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# NLCD Landcover
2+
3+
Highlights:
4+
5+
- Paletted
6+
- Custom CRS (not defined by EPSG code)
7+
8+
## Data creation
9+
10+
From
11+
12+
```
13+
s3://usgs-landcover/annual-nlcd/c1/v1/cu/mosaic/Annual_NLCD_LndCov_2024_CU_C1V1.tif
14+
```
15+
16+
```bash
17+
AWS_REQUEST_PAYER=requester pixi run gdal_translate \
18+
-srcwin 0 0 256 256 \
19+
-of COG \
20+
-co BLOCKSIZE=64 \
21+
/vsis3/usgs-landcover/annual-nlcd/c1/v1/cu/mosaic/Annual_NLCD_LndCov_2024_CU_C1V1.tif \
22+
nlcd_landcover.tif
23+
```

real_data/nlcd/nlcd_landcover.tif

9.98 KB
Binary file not shown.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
```
2+
Driver: GTiff
3+
File: real_data/nlcd/nlcd_landcover.tif
4+
COG: True
5+
Compression: LZW
6+
ColorSpace: None
7+
8+
Profile
9+
Width: 256
10+
Height: 256
11+
Bands: 1
12+
Tiled: True
13+
Dtype: uint8
14+
NoData: 250.0
15+
Alpha Band: False
16+
Internal Mask: False
17+
Interleave: BAND
18+
ColorMap: True
19+
ColorInterp: ('palette',)
20+
Scales: (1.0,)
21+
Offsets: (0.0,)
22+
23+
Geo
24+
Crs: PROJCS["AEA WGS84",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]
25+
Origin: (-2415585.0, 3314805.0)
26+
Resolution: (30.0, -30.0)
27+
BoundingBox: (-2415585.0, 3307125.0, -2407905.0, 3314805.0)
28+
MinZoom: 11
29+
MaxZoom: 12
30+
31+
Image Metadata
32+
AREA_OR_POINT: Area
33+
34+
Image Structure
35+
LAYOUT: COG
36+
COMPRESSION: LZW
37+
INTERLEAVE: BAND
38+
39+
Band 1
40+
ColorInterp: palette
41+
42+
IFD
43+
Id Size BlockSize Decimation
44+
0 256x256 64x64 0
45+
1 128x128 64x64 2
46+
```

real_data/vantor/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Vantor (formerly Maxar)
2+
3+
The test images in this folder are copyright [Vantor](https://vantor.com/), provided under a [Creative Commons Attribution Non Commercial](https://spdx.org/licenses/CC-BY-NC-4.0.html) license via the [Maxar Open Data Program](https://registry.opendata.aws/maxar-open-data/).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Repro
2+
3+
From
4+
```
5+
https://maxar-opendata.s3.amazonaws.com/events/yellowstone-flooding22/ard/12/120000020112/2022-06-18/10300100D51B8C00-visual.tif
6+
```
7+
8+
```bash
9+
pixi run gdal_translate \
10+
-srcwin 0 0 64 64 \
11+
-of COG \
12+
-co COMPRESS=JPEG \
13+
-co BLOCKSIZE=32 \
14+
/vsicurl/https://maxar-opendata.s3.amazonaws.com/events/yellowstone-flooding22/ard/12/120000020112/2022-06-18/10300100D51B8C00-visual.tif \
15+
maxar_opendata_yellowstone_visual.tif
16+
```
File renamed without changes.

real_data/maxar_opendata_yellowstone_visual_info.md renamed to real_data/vantor/maxar_opendata_yellowstone_visual_info.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
```
22
Driver: GTiff
3-
File: real_data/maxar_opendata_yellowstone_visual.tif
3+
File: real_data/vantor/maxar_opendata_yellowstone_visual.tif
44
COG: True
55
Compression: JPEG
66
ColorSpace: YCbCr

0 commit comments

Comments
 (0)