rslearn.data_sources.aws_glo30¶
aws_glo30 ¶
Copernicus GLO-30 DEM (30m) from the original public S3 bucket.
This module provides a data source for the Copernicus Global 30m Digital Elevation
Model (GLO-30), reading directly from the public AWS S3 bucket
copernicus-dem-30m (no credentials required).
The dataset is split into 1x1-degree Cloud-Optimized GeoTIFF tiles, with filenames like::
Copernicus_DSM_COG_10_N47_00_W123_00_DEM/Copernicus_DSM_COG_10_N47_00_W123_00_DEM.tif
Only tiles containing land are published, so the bucket includes a tileList.txt
index that we download and cache to avoid creating items for tiles that do not exist.
This data source serves the raw elevation band. Derived terrain products (slope
and aspect) are computed on the fly at training/inference time; see
rslearn.train.transforms.terrain.ElevationToSlopeAspect.
The underlying elevation data were acquired by the TanDEM-X mission between 2011 and 2015. Items from this data source do not come with a time range (the DEM is static).
Note: the AWS copernicus-dem-30m bucket serves the Copernicus DEM 2021 release.
Newer releases (e.g. 2024_1) are only available through the Copernicus Data Space
Ecosystem API, not this public bucket. See also
rslearn.data_sources.planetary_computer.CopDemGlo30 for the same dataset via
Microsoft Planetary Computer.
CopernicusGLO30 ¶
Bases: DirectMaterializeDataSource[Item], ItemLookupDataSource[Item]
Data source for Copernicus GLO-30 DEM from the public S3 bucket.
The data is split into 1x1-degree Cloud-Optimized GeoTIFFs, so it is read on-demand at materialize time; there is no ingest step. The underlying elevation was acquired by the TanDEM-X mission between 2011 and 2015. Items from this data source do not carry a time range (the DEM is static).
Only land tiles are published. We use the bucket's tileList.txt index to
ensure we only create items for tiles that exist, so windows over ocean simply
match fewer (or no) tiles rather than failing to read.
The layer's band_sets should contain a single band set with a single band
(the elevation band). Use
rslearn.train.transforms.terrain.ElevationToSlopeAspect to derive slope and
aspect from the elevation band at training/inference time.
Example config::
{
"class_path": "rslearn.data_sources.aws_glo30.CopernicusGLO30",
"init_args": {"metadata_cache_dir": "cache/glo30"},
"query_config": {"space_mode": "MOSAIC", "max_matches": 1},
"ingest": false
}
Source code in rslearn/data_sources/aws_glo30.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | |
get_item_by_name ¶
get_item_by_name(name: str) -> Item
Gets an item by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
the tile name (e.g. |
required |
Returns:
| Type | Description |
|---|---|
Item
|
the Item object. |
Source code in rslearn/data_sources/aws_glo30.py
get_items ¶
get_items(geometries: list[STGeometry], query_config: QueryConfig) -> list[list[MatchedItemGroup[Item]]]
Get a list of items intersecting the given geometries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometries
|
list[STGeometry]
|
the spatiotemporal geometries. |
required |
query_config
|
QueryConfig
|
the query configuration. |
required |
Returns:
| Type | Description |
|---|---|
list[list[MatchedItemGroup[Item]]]
|
list of groups of items for each geometry. |
Source code in rslearn/data_sources/aws_glo30.py
ingest ¶
ingest(tile_store: TileStoreWithLayer, items: list[Item], geometries: list[list[STGeometry]]) -> None
Not supported; the tiles are COGs that are read at materialize time.
Source code in rslearn/data_sources/aws_glo30.py
get_asset_url ¶
get_asset_url(item: Item, asset_key: str) -> str
Return the URL of the COG backing the given item.