mikonvergence commited on
Commit
61c238c
1 Parent(s): 179f7c5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -4
README.md CHANGED
@@ -26,6 +26,8 @@ configs:
26
  data_files: metadata.parquet
27
  ---
28
 
 
 
29
  # Major TOM Core-DEM
30
 
31
  Contains a global coverage of [Copernicus DEM](https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model), each of size 356 x 356 pixels.
@@ -34,7 +36,7 @@ Contains a global coverage of [Copernicus DEM](https://spacedata.copernicus.eu/c
34
  |:-------|:-------------:|:-----------------:|:----------:|:------------:|
35
  |Copernicus DEM 30 | Digital Surface Model (DSM) |1,837,843| 356 x 356 (30 m) | > 1.654 Billion |
36
 
37
- Produced in collaboration by European Space Agency Φ-lab and Adobe Research.
38
 
39
  ## Content
40
 
@@ -42,7 +44,7 @@ Produced in collaboration by European Space Agency Φ-lab and Adobe Research.
42
  |:-------|:--------|:-----------|
43
  | DEM | Original data | 30m |
44
  | thumbnail | compressed hillshade visualisation | 30m |
45
- | compressed | compressed jpeg of original data | 30m |
46
 
47
  ## Spatial Coverage
48
  This is a global monotemporal dataset that contains nearly the entire COP-DEM dataset.
@@ -50,11 +52,32 @@ This is a global monotemporal dataset that contains nearly the entire COP-DEM da
50
  The following figure demonstrates the spatial coverage (only black pixels are absent):
51
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6304c06eeb6d777a838eab63/v5O9bSVPsnKNOrnzVNuH0.png)
52
 
 
53
  ## Example Use
54
 
55
  Interface scripts are available at https://github.com/ESA-PhiLab/Major-TOM
56
 
57
- Here's a sneak peek with a thumbnail image:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  ```python
59
  from fsspec.parquet import open_parquet_file
60
  import pyarrow.parquet as pq
@@ -72,9 +95,16 @@ with open_parquet_file(url,columns = ["thumbnail"]) as f:
72
  stream = BytesIO(first_row_group['thumbnail'][0].as_py())
73
  image = Image.open(stream)
74
  ```
 
 
 
75
 
76
- Powered by [Φ-lab, European Space Agency (ESA) 🛰️](https://huggingface.co/ESA-philab)
 
 
 
77
 
78
  ---
 
79
  Produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH
80
  2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved
 
26
  data_files: metadata.parquet
27
  ---
28
 
29
+
30
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6304c06eeb6d777a838eab63/2yG5jw06VHqwGT2IO6D_a.png)
31
  # Major TOM Core-DEM
32
 
33
  Contains a global coverage of [Copernicus DEM](https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model), each of size 356 x 356 pixels.
 
36
  |:-------|:-------------:|:-----------------:|:----------:|:------------:|
37
  |Copernicus DEM 30 | Digital Surface Model (DSM) |1,837,843| 356 x 356 (30 m) | > 1.654 Billion |
38
 
39
+
40
 
41
  ## Content
42
 
 
44
  |:-------|:--------|:-----------|
45
  | DEM | Original data | 30m |
46
  | thumbnail | compressed hillshade visualisation | 30m |
47
+ | compressed | compressed png of original data | 30m |
48
 
49
  ## Spatial Coverage
50
  This is a global monotemporal dataset that contains nearly the entire COP-DEM dataset.
 
52
  The following figure demonstrates the spatial coverage (only black pixels are absent):
53
  ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6304c06eeb6d777a838eab63/v5O9bSVPsnKNOrnzVNuH0.png)
54
 
55
+ 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.
56
  ## Example Use
57
 
58
  Interface scripts are available at https://github.com/ESA-PhiLab/Major-TOM
59
 
60
+ Here's an example with reading directly via http from HuggingFace:
61
+ ```python
62
+ from fsspec.parquet import open_parquet_file
63
+ import pyarrow.parquet as pq
64
+ from rasterio.io import MemoryFile
65
+ from PIL import Image
66
+
67
+ PARQUET_FILE = 'part_00390' # parquet number
68
+ ROW_INDEX = 42 # row number (about 500 per parquet)
69
+
70
+ url = "https://huggingface.co/datasets/Major-TOM/Core-DEM/resolve/main/images/{}.parquet".format(PARQUET_FILE)
71
+ with open_parquet_file(url,columns = ["DEM"]) as f:
72
+ with pq.ParquetFile(f) as pf:
73
+ first_row_group = pf.read_row_group(ROW_INDEX, columns=['DEM'])
74
+
75
+ with MemoryFile(first_row_group['DEM'][0].as_py()) as mem_f:
76
+ with mem_f.open(driver='GTiff') as f:
77
+ dem = f.read()
78
+ ```
79
+
80
+ and here's an example with a thumbnail image:
81
  ```python
82
  from fsspec.parquet import open_parquet_file
83
  import pyarrow.parquet as pq
 
95
  stream = BytesIO(first_row_group['thumbnail'][0].as_py())
96
  image = Image.open(stream)
97
  ```
98
+ ### Reprojection Details
99
+ 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).
100
+
101
 
102
+ 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.
103
+
104
+ ### Credits
105
+ 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.
106
 
107
  ---
108
+
109
  Produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH
110
  2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved