Skip to content

Commit 342fdda

Browse files
committed
fix: Update text based on PR review
1 parent 747b3ee commit 342fdda

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

visualization/OverviewResampling.ipynb

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "1104f349",
5+
"id": "37c4c227",
66
"metadata": {},
77
"source": [
88
"# Cloud Optimized Geotiff (COG) Overview Resampling\n",
@@ -31,7 +31,7 @@
3131
{
3232
"cell_type": "code",
3333
"execution_count": 1,
34-
"id": "1480211a",
34+
"id": "eedcd26f",
3535
"metadata": {},
3636
"outputs": [
3737
{
@@ -50,7 +50,7 @@
5050
{
5151
"cell_type": "code",
5252
"execution_count": 2,
53-
"id": "32d6527c",
53+
"id": "bedb3387",
5454
"metadata": {},
5555
"outputs": [],
5656
"source": [
@@ -69,7 +69,7 @@
6969
{
7070
"cell_type": "code",
7171
"execution_count": 3,
72-
"id": "1d811905",
72+
"id": "b81e23aa",
7373
"metadata": {},
7474
"outputs": [],
7575
"source": [
@@ -80,7 +80,7 @@
8080
{
8181
"cell_type": "code",
8282
"execution_count": 4,
83-
"id": "5a6d45bf",
83+
"id": "ecb980db",
8484
"metadata": {},
8585
"outputs": [
8686
{
@@ -160,7 +160,7 @@
160160
},
161161
{
162162
"cell_type": "markdown",
163-
"id": "fa45496d",
163+
"id": "bec46918",
164164
"metadata": {},
165165
"source": [
166166
"## Generate Overviews\n",
@@ -171,7 +171,7 @@
171171
{
172172
"cell_type": "code",
173173
"execution_count": 5,
174-
"id": "20674713",
174+
"id": "d0cdc8bc",
175175
"metadata": {},
176176
"outputs": [],
177177
"source": [
@@ -188,6 +188,8 @@
188188
" dst_path = src_path.replace(\".tif\", f\"_{resample_method}.tif\")\n",
189189
" dst_path = f\"{out_dir}/{os.path.basename(dst_path)}\"\n",
190190
" \n",
191+
" # Using multiple CPUS\n",
192+
" # Using blocksize 512 per recommendations\n",
191193
" config = {\"GDAL_NUM_THREADS\": \"ALL_CPUS\", \"GDAL_TIFF_OVR_BLOCKSIZE\": \"512\"} \n",
192194
" output_profile = cog_profiles.get(\"deflate\")\n",
193195
" output_profile.update({\"blockxsize\": \"512\", \"blockysize\": \"512\"})\n",
@@ -210,7 +212,7 @@
210212
{
211213
"cell_type": "code",
212214
"execution_count": 6,
213-
"id": "0b85a912",
215+
"id": "67cb709e",
214216
"metadata": {},
215217
"outputs": [
216218
{
@@ -222,8 +224,7 @@
222224
}
223225
],
224226
"source": [
225-
"# This is a list of resampling methods that GDAL 3.4+ allows\n",
226-
"#resample_methods = [\"AVERAGE\", \"NEAREST\", \"BILINEAR\", \"CUBIC\", \"CUBICSPLINE\", \"LANCZOS\", \"MODE\", \"RMS\"]\n",
227+
"# Make a list of resampling methods that GDAL 3.4+ allows\n",
227228
"\n",
228229
"from rasterio.enums import Resampling as ResamplingEnums\n",
229230
"\n",
@@ -236,7 +237,7 @@
236237
{
237238
"cell_type": "code",
238239
"execution_count": 7,
239-
"id": "157adba7",
240+
"id": "aefb2205",
240241
"metadata": {},
241242
"outputs": [
242243
{
@@ -264,7 +265,7 @@
264265
{
265266
"cell_type": "code",
266267
"execution_count": 8,
267-
"id": "602cf874",
268+
"id": "4e88387c",
268269
"metadata": {},
269270
"outputs": [
270271
{
@@ -293,7 +294,7 @@
293294
{
294295
"cell_type": "code",
295296
"execution_count": 9,
296-
"id": "a398ae4b",
297+
"id": "72e01802",
297298
"metadata": {},
298299
"outputs": [
299300
{
@@ -375,7 +376,7 @@
375376
},
376377
{
377378
"cell_type": "markdown",
378-
"id": "f7cc2bf5",
379+
"id": "96a13589",
379380
"metadata": {},
380381
"source": [
381382
"## Compare the Results\n",
@@ -386,7 +387,7 @@
386387
{
387388
"cell_type": "code",
388389
"execution_count": 10,
389-
"id": "096ba8e8",
390+
"id": "88d3ca7e",
390391
"metadata": {},
391392
"outputs": [],
392393
"source": [
@@ -430,7 +431,7 @@
430431
{
431432
"cell_type": "code",
432433
"execution_count": 11,
433-
"id": "1e61f9a3",
434+
"id": "497755d1",
434435
"metadata": {},
435436
"outputs": [
436437
{
@@ -459,7 +460,7 @@
459460
},
460461
{
461462
"cell_type": "markdown",
462-
"id": "e5f517fb",
463+
"id": "5400bd54",
463464
"metadata": {},
464465
"source": [
465466
"## Interpretation\n",

0 commit comments

Comments
 (0)