@@ -34,23 +34,13 @@ Test: Info Command (Library Info)
3434Test the info command without arguments to see library information.
3535We just verify key information is present, ignoring formatting:
3636
37- $ uv run -m geotessera. cli info -- dataset-version v1
37+ $ uv run -m geotessera. cli info -- dataset-version v1 | grep -E ' Available years '
3838 Downloading registry from https: // dl2. geotessera. org/ v1/ registry. parquet
3939 Registry downloaded successfully
4040 Loaded GeoParquet with 1 ,158 ,150 tiles
4141 Downloading landmasks registry from https: // dl2. geotessera. org/ v1/ landmasks. parquet
4242 Landmasks registry downloaded successfully
43- Version : 0.7 . 0
4443 Available years: 2017 , 2018 , 2019 , 2020 , 2021 , 2022 , 2023 , 2024
45- 2017 tiles: 14 ,229
46- 2018 tiles: 15 ,958
47- 2019 tiles: 15 ,999
48- 2020 tiles: 17 ,420
49- 2021 tiles: 15 ,684
50- 2022 tiles: 15 ,404
51- 2023 tiles: 15 ,997
52- 2024 tiles: 1 ,047 ,459
53- Total landmasks: 1 ,593 ,479
5444
5545Test : Download Dry Run for UK Tile
5646---------------------------------- -
@@ -59,7 +49,7 @@ Test downloading a single tile covering London, UK using --dry-run to avoid actu
5949Verify key information is present:
6050
6151 $ uv run -m geotessera. cli download \
62- > -- bbox " -0.1,51.4 ,0.1,51.6 " \
52+ > -- bbox " -0.1,51.3 ,0.1,51.5 " \
6353 > -- year 2024 \
6454 > -- format tiff \
6555 > -- dry-run \
@@ -68,10 +58,10 @@ Verify key information is present:
6858 Year: 2024
6959 Compression: lzw
7060 Dataset version: v1
71- Found 4 tiles for region in year 2024
72- Files to download: 4
73- Total download size: 1.6 GB
74- Tiles in region: 4
61+ Found 16 tiles for region in year 2024
62+ Files to download: 16
63+ Total download size: 6.4 GB
64+ Tiles in region: 16
7565 Year: 2024
7666 Format: TIFF
7767
@@ -81,33 +71,33 @@ Test: Download Single UK Tile (TIFF format)
8171Download a single tile in TIFF format to a temporary directory:
8272
8373 $ uv run -m geotessera. cli download \
84- > -- bbox " -0.1,51.4 ,0.1,51.6 " \
74+ > -- bbox " -0.1,51.3 ,0.1,51.5 " \
8575 > -- year 2024 \
8676 > -- format tiff \
8777 > -- output " $ TESTDIR /uk_tiles_tiff" \
8878 > -- dataset-version v1 2 > &1 | grep -E ' SUCCESS' | sed ' s/ *$//'
89- SUCCESS: Exported 4 GeoTIFF files
79+ SUCCESS: Exported 16 GeoTIFF files
9080
9181Verify TIFF files were created in the registry structure:
9282
9383 $ [ -n " $(find " $ TESTDIR / uk_tiles_tiff/ global_0. 1_degree_representation/ 2024 " -name " *. tif* " 2>/dev/null)" ] && echo " TIFF files created"
9484 TIFF files created
9585
9686 $ find " $ TESTDIR /uk_tiles_tiff/global_0.1_degree_representation/2024" -name " *.tif*" | wc -l | tr -d ' '
97- 4
87+ 16
9888
9989Test : Download Single UK Tile (NPY format)
10090------------------------------------------ -
10191
10292Download the same tile in NPY format (quantized arrays with scales):
10393
10494 $ uv run -m geotessera. cli download \
105- > -- bbox " -0.1,51.4 ,0.1,51.6 " \
95+ > -- bbox " -0.1,51.3 ,0.1,51.5 " \
10696 > -- year 2024 \
10797 > -- format npy \
10898 > -- output " $ TESTDIR /uk_tiles_npy" \
10999 > -- dataset-version v1 2 > &1 | grep -E ' SUCCESS' | sed ' s/ *$//'
110- SUCCESS: Downloaded 4 tiles (12 files, 424.0 MB )
100+ SUCCESS: Downloaded 16 tiles (48 files, 1.7 GB )
111101
112102Verify NPY directory structure was created:
113103
@@ -123,7 +113,7 @@ Verify NPY files exist in grid subdirectories:
123113 Embedding NPY files created
124114
125115 $ find " $ TESTDIR /uk_tiles_npy/global_0.1_degree_representation/2024" -name " *.npy" | wc -l | tr -d ' '
126- 8
116+ 32
127117
128118 $ [ -n " $(find " $ TESTDIR / uk_tiles_npy/ global_0. 1_degree_representation/ 2024 " -name " * _scales. npy" 2>/dev/null)" ] && echo " Scales NPY files created"
129119 Scales NPY files created
@@ -137,60 +127,60 @@ Test: Info Command on Downloaded TIFF Tiles
137127Test the info command on the downloaded TIFF tiles:
138128
139129 $ uv run -m geotessera. cli info -- tiles " $ TESTDIR /uk_tiles_tiff"
140- Total tiles: 4
130+ Total tiles: 16
141131 Format: GEOTIFF
142132 Years: 2024
143133 CRS: EPSG: 32630 , EPSG: 32631
144- Longitude: -0.100000 to 0.100000
145- Latitude: 51.400000 to 51.600000
134+ Longitude: -0.200000 to 0.200000
135+ Latitude: 51.200000 to 51.600000
146136 Band Count Files
147- 128 bands 4
137+ 128 bands 16
148138
149139 $ uv run -m geotessera. cli info -- tiles " $ TESTDIR /uk_tiles_tiff"
150- Total tiles: 4
140+ Total tiles: 16
151141 Format: GEOTIFF
152142 Years: 2024
153143 CRS: EPSG: 32630 , EPSG: 32631
154- Longitude: -0.100000 to 0.100000
155- Latitude: 51.400000 to 51.600000
144+ Longitude: -0.200000 to 0.200000
145+ Latitude: 51.200000 to 51.600000
156146 Band Count Files
157- 128 bands 4
147+ 128 bands 16
158148
159149Test : Info Command on Downloaded NPY Tiles
160150------------------------------------------ -
161151
162152Test the info command on the downloaded NPY tiles:
163153
164154 $ uv run -m geotessera. cli info -- tiles " $ TESTDIR /uk_tiles_npy"
165- Total tiles: 4
155+ Total tiles: 16
166156 Format: NPY
167157 Years: 2024
168158 CRS: EPSG: 32630 , EPSG: 32631
169- Longitude: -0.100000 to 0.100000
170- Latitude: 51.400000 to 51.600000
159+ Longitude: -0.200000 to 0.200000
160+ Latitude: 51.200000 to 51.600000
171161 Band Count Files
172- 128 bands 4
162+ 128 bands 16
173163
174164 $ uv run -m geotessera. cli info -- tiles " $ TESTDIR /uk_tiles_npy"
175- Total tiles: 4
165+ Total tiles: 16
176166 Format: NPY
177167 Years: 2024
178168 CRS: EPSG: 32630 , EPSG: 32631
179- Longitude: -0.100000 to 0.100000
180- Latitude: 51.400000 to 51.600000
169+ Longitude: -0.200000 to 0.200000
170+ Latitude: 51.200000 to 51.600000
181171 Band Count Files
182- 128 bands 4
172+ 128 bands 16
183173
184174Test : Resume Capability for NPY Downloads
185175------------------------------------------
186176
187177Test that re-running the NPY download skips existing files:
188178
189179 $ uv run -m geotessera. cli download \
190- > -- bbox " -0.1,51.4 ,0.1,51.6 " \
180+ > -- bbox " -0.1,51.3 ,0.1,51.5 " \
191181 > -- year 2024 \
192182 > -- format npy \
193183 > -- output " $ TESTDIR /uk_tiles_npy" \
194184 > -- dataset-version v1 2 > &1 | grep -E ' (Skipped|existing files)'
195- Skipped 12 existing files (resume capability)
185+ Skipped 48 existing files (resume capability)
196186
0 commit comments