File size: 5,108 Bytes
179f7c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61c238c
 
179f7c5
 
 
 
 
 
 
 
61c238c
179f7c5
 
 
 
 
 
 
61c238c
179f7c5
 
 
 
 
 
 
61c238c
179f7c5
 
 
 
61c238c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179f7c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61c238c
 
 
179f7c5
61c238c
 
 
 
179f7c5
 
61c238c
179f7c5
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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
---
license: cc-by-sa-4.0
tags:
- earth-observation
- remote-sensing
- elevation
- satellite
- geospatial
size_categories:
- 1M<n<10M
dataset_info:
- config_name: default
  features:
  - name: grid_cell
    dtype: string
  - name: thumbnail
    dtype: image
  - name: compressed
    dtype: image
  - name: DEM
    dtype: binary
configs:
- config_name: default
  data_files: images/*.parquet
- config_name: metadata
  data_files: metadata.parquet
---


![image/png](https://cdn-uploads.huggingface.co/production/uploads/6304c06eeb6d777a838eab63/2yG5jw06VHqwGT2IO6D_a.png)
# Major TOM Core-DEM

Contains a global coverage of [Copernicus DEM](https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model), each of size 356 x 356 pixels.

| Source | Modality Type | Number of Patches | Patch Size | Total Pixels |
|:-------|:-------------:|:-----------------:|:----------:|:------------:|
|Copernicus DEM 30 | Digital Surface Model (DSM) |1,837,843| 356 x 356 (30 m) | > 1.654 Billion |



## Content

| Column | Details | Resolution |
|:-------|:--------|:-----------|
| DEM | Original data | 30m | 
| thumbnail | compressed hillshade visualisation | 30m | 
| compressed | compressed png of original data | 30m | 

## Spatial Coverage
This is a global monotemporal dataset that contains nearly the entire COP-DEM dataset.

The following figure demonstrates the spatial coverage (only black pixels are absent):
![image/png](https://cdn-uploads.huggingface.co/production/uploads/6304c06eeb6d777a838eab63/v5O9bSVPsnKNOrnzVNuH0.png)

In this first version, all available DEM data was included except for the Major TOM cells below the 89th latitude and two degrees west off the date change line. Azerbaijan and Armenia weren’t included either as they are unavailable on the Creodias platform used to create this dataset.
## Example Use

Interface scripts are available at https://github.com/ESA-PhiLab/Major-TOM

Here's an example with reading directly via http from HuggingFace:
```python
from fsspec.parquet import open_parquet_file
import pyarrow.parquet as pq
from rasterio.io import MemoryFile
from PIL import Image

PARQUET_FILE = 'part_00390' # parquet number
ROW_INDEX = 42 # row number (about 500 per parquet)

url = "https://huggingface.co/datasets/Major-TOM/Core-DEM/resolve/main/images/{}.parquet".format(PARQUET_FILE)
with open_parquet_file(url,columns = ["DEM"]) as f:
    with pq.ParquetFile(f) as pf:
        first_row_group = pf.read_row_group(ROW_INDEX, columns=['DEM'])

with MemoryFile(first_row_group['DEM'][0].as_py()) as mem_f:
    with mem_f.open(driver='GTiff') as f:
        dem = f.read()
```

and here's an example with a thumbnail image:
```python
from fsspec.parquet import open_parquet_file
import pyarrow.parquet as pq
from io import BytesIO
from PIL import Image

PARQUET_FILE = 'part_00390' # parquet number
ROW_INDEX = 42 # row number (about 500 per parquet)

url = "https://huggingface.co/datasets/Major-TOM/Core-DEM/resolve/main/images/{}.parquet".format(PARQUET_FILE)
with open_parquet_file(url,columns = ["thumbnail"]) as f:
    with pq.ParquetFile(f) as pf:
        first_row_group = pf.read_row_group(ROW_INDEX, columns=['thumbnail'])

stream = BytesIO(first_row_group['thumbnail'][0].as_py())
image = Image.open(stream)
```
### Reprojection Details
Contrary to [S1 RTC](huggingface.co/datasets/Major-TOM/Core-S1RTC) and S2 ([L1C](huggingface.co/datasets/Major-TOM/Core-S2L1C) & [L2A](huggingface.co/datasets/Major-TOM/Core-S2L2A)) products, which are taken in their native projection to create their respective Major TOM Core datasets, Copernicus DEM, natively in EPSG:4326, was reprojected to a carefully chosen projection. To  guarantee uniformity across Major Tom sources, it was reprojected to the corresponding UTM zone of the cell. This leads to inconsistency between Sentinel-2 and COP-DEM cells in some cases. For the S2-L2A product this is estimated to 2.5% of all the cells where COP-DEM and S2-L2A are available (out of total 1 679 898 cells).


Large DEM tiles were projected and resampled to 30m using bilinear interpolation. Small major tom cells were then cropped for it using nearest neighbor interpolation if needed. Some tiles above water and around Armenia and Azerbaijan, may exhibit missing pixels which value were set to -32767.

### Credits
This dataset is the product of a collaboration between [Φ-lab, European Space Agency (ESA)](https://huggingface.co/ESA-philab)  and the  [Adobe Research (Paris, France)](https://research.adobe.com/careers/paris/). The dataset was put together by [Paul Borne--Pons](https://www.linkedin.com/in/paul-bp-cs/) under the supervision of Mikolaj Czerkawski and Alistair Francis (the original authors of the Major TOM project) as part of his stay at ESA Phi Lab. The idea behind this collaboration is to explore the synergies between Sentinel 2 products and DEM data, notably for the generation of terrains.

---

Produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH
2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved