Skip to content

Commit 24569d9

Browse files
Rebuild README.md + index.html from updated README.Rmd
Source-of-truth fix: README.md was hand-written in the previous commit because the html_document render failed (staticimports + DT not installed). Both packages installed; README.Rmd now renders cleanly to both targets: - README.md (github_document, rmd_on=FALSE) — GitHub landing page - index.html (html_document, rmd_on=TRUE) — newgraphenvironment.com/stac_dem_bc/ params$update_query=FALSE so the live STAC search did not re-run; table content uses the cached data/stac_result.rds from the last collection sync. No content change vs the previous hand-written README.md — render just makes the GitHub view authoritative from the .Rmd source.
1 parent 4513272 commit 24569d9

3 files changed

Lines changed: 195 additions & 139 deletions

File tree

README.html

Lines changed: 87 additions & 66 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ stac_dem_bc
99

1010
The goal of
1111
[`stac_dem_bc`](https://github.com/NewGraphEnvironment/stac_dem_bc) is
12-
to serve British Columbia's [LidarBC](https://lidar.gov.bc.ca/) digital
12+
to serve British Columbias [LidarBC](https://lidar.gov.bc.ca/) digital
1313
elevation model collection (~58,000 GeoTIFFs hosted on the provincial
1414
objectstore) as a [SpatioTemporal Asset Catalog
1515
(STAC)](https://stacspec.org/), queryable by location and time via the
@@ -20,16 +20,16 @@ objectstore) as a [SpatioTemporal Asset Catalog
2020
<br>
2121

2222
The build pipeline lives under [`scripts/`](scripts/README.md) — a
23-
six-step flow (fetch → validate-access → collection-create →
24-
item-create → item-validate → s3-sync) that turns the raw provincial
25-
GeoTIFF URLs into a searchable pgstac catalog. See the
26-
[scripts README](scripts/README.md) for the pipeline walkthrough; key
27-
concepts (COG, STAC, pgstac, date extraction from filenames, validation
28-
caching for incremental rebuilds) are explained there in plain language.
23+
six-step flow (fetch → validate-access → collection-create → item-create
24+
→ item-validate → s3-sync) that turns the raw provincial GeoTIFF URLs
25+
into a searchable pgstac catalog. See the [scripts
26+
README](scripts/README.md) for the pipeline walkthrough; key concepts
27+
(COG, STAC, pgstac, date extraction from filenames, validation caching
28+
for incremental rebuilds) are explained there in plain language.
2929

3030
<br>
3131

32-
<img src="fig/cover.JPG" width="100%" style="display: block; margin: auto;" />
32+
<img src="fig/cover.JPG" alt="" width="100%" style="display: block; margin: auto;" />
3333

3434
<br>
3535

@@ -47,39 +47,47 @@ aoi <- bcdata::bcdc_query_geodata("freshwater-atlas-watershed-groups") |>
4747
sf::st_transform(crs = 4326)
4848

4949
date_start <- "2018-01-01T00:00:00Z"
50-
date_end <- "2020-12-31T00:00:00Z"
50+
date_end <- "2020-12-31T00:00:00Z"
5151

5252
# use rstac to query the collection
5353
q <- rstac::stac("https://images.a11s.one/") |>
5454
rstac::stac_search(
5555
collections = "stac-dem-bc",
5656
intersects = jsonlite::fromJSON(
57-
geojsonsf::sf_geojson(aoi, atomise = TRUE, simplify = FALSE),
57+
geojsonsf::sf_geojson(
58+
aoi, atomise = TRUE, simplify = FALSE
59+
),
5860
simplifyVector = FALSE
5961
) |> (\(x) x$geometry)(),
6062
datetime = paste0(date_start, "/", date_end)
6163
) |>
6264
rstac::post_request()
6365

64-
# fetch all matching items
65-
r <- q |> rstac::items_fetch()
66+
# get details of the items
67+
r <- q |>
68+
rstac::items_fetch()
6669

67-
# extract download URLs
70+
# burn the results locally so we can serve it instantly on index.html builds
71+
saveRDS(r, "data/stac_result.rds")
72+
```
73+
74+
``` r
75+
r <- readRDS("data/stac_result.rds")
76+
# build the table to display the info
6877
tab <- tibble::tibble(
69-
url_download = purrr::map_chr(
70-
r$features,
71-
~ purrr::pluck(.x, "assets", "image", "href")
72-
)
78+
url_download = purrr::map_chr(r$features, ~ purrr::pluck(.x, "assets", "image", "href"))
7379
)
7480
```
7581

82+
<br>
83+
7684
Please see <http://www.newgraphenvironment.com/stac_dem_bc> for the
7785
published table of collection links.
7886

7987
## QGIS Data Source Manager (v3.42+)
8088

8189
QGIS 3.42 added native STAC support — connect directly to the catalog
82-
and filter by the current map view. See [Lutra Consulting's STAC-in-QGIS
90+
and filter by the current map view. See [Lutra Consultings STAC-in-QGIS
8391
blog post](https://www.lutraconsulting.co.uk/blogs/stac-in-qgis) for a
8492
walk-through.
8593

@@ -89,7 +97,6 @@ walk-through.
8997
<p class="caption">
9098

9199
Connecting to <https://images.a11s.one>
92-
93100
</p>
94101

95102
</div>
@@ -100,7 +107,6 @@ Connecting to <https://images.a11s.one>
100107
<p class="caption">
101108

102109
Using the field of view in QGIS to filter results
103-
104110
</p>
105111

106112
</div>
@@ -112,30 +118,31 @@ collections:
112118

113119
- [`stac_uav_bc`](https://github.com/NewGraphEnvironment/stac_uav_bc)
114120
UAV imagery, organized by watershed
115-
- [`stac_airphoto_bc`](https://github.com/NewGraphEnvironment/stac_airphoto_bc)
116-
historic airphoto thumbnails (1963–2019)
121+
- [`stac_airphoto_bc`](https://github.com/NewGraphEnvironment/stac_airphoto_bc)
122+
historic airphoto thumbnails (1963–2019)
117123

118124
## Roadmap
119125

120126
- **uv-based Python dependency management**
121-
([#16](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/16))
127+
([\#16](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/16))
122128
— migrate from conda to uv for faster, more reproducible Python
123129
environments.
124130
- **Structured logging + performance benchmarking**
125-
([#6](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/6)) —
131+
([\#6](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/6)) —
126132
instrument the pipeline so build performance is quantifiable across
127133
runs.
128134
- **True footprint geometry**
129-
([#2](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/2)) —
135+
([\#2](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/2)) —
130136
recalculate per-item footprints to exclude no-data pixels rather than
131137
using bounding boxes; gives accurate spatial-overlap queries.
132138
- **Validation-failure triage**
133-
([#11](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/11))
139+
([\#11](https://github.com/NewGraphEnvironment/stac_dem_bc/issues/11))
134140
— STACError on specific item JSONs; underlying root cause + automated
135141
retry.
136142

137-
Browse [open issues](https://github.com/NewGraphEnvironment/stac_dem_bc/issues)
138-
for the full backlog.
143+
Browse [open
144+
issues](https://github.com/NewGraphEnvironment/stac_dem_bc/issues) for
145+
the full backlog.
139146

140147
## License
141148

index.html

Lines changed: 73 additions & 45 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)