Geoscience Reference
In-Depth Information
The numbers _Y_X added to the end of the input filename describe the relative
locations of the corresponding tiles (row Y , column X ), starting from the upper left
part of the image. For the subsequent levels (1-4 in this case), the number of tiles
decreases as the spatial resolution gets coarser. For the landsat 8 image used, the
number of tiles for the respective levels are: 930 (top level), 240 (level 1), 64 (level
2), 16 (level 3) and 4 (level 4).
The number of tiles per level can be calculated as follows. At level 0, we divide
the image size (7,801 samples and 7,571 lines) by the tile size (256 samples and 256
lines). To cover the whole scene, we need to round to the upper integer (see Eq. 7.1 ).
Multiplying the number of tiles in x (31) by the number of tiles in y (30) results in
930 tiles at the original resolution of 30 m. At the next level, the resolution of the
raster tiles are created at half the spatial resolution (60 m), requiring roughly one
quarter of the tiles at the original resolution (15
×
=
16
240). At level 4, the spatial
resolution of the tiles equals 480 m (30
×
16) and the image can be covered with
four tiles.
level 0: Original resolution (30 m)
7801
/
256
=
30
.
473
31 tiles in x
7571
/
256
=
29
.
574
30 tiles in y
(7.1)
level 1: half resolution (60 m)
7801
/
256
/
2
=
15
.
236
16 tiles in x
7571
/
256
/
2
=
14
.
781
15 tiles in y
(7.2)
1
16
level 4:
resolution (480 m)
7801
/
256
/
16
=
1
.
905
2 tiles in x
7571
/
256
/
16
=
1
.
848
2 tiles in y
(7.3)
A schematic overview of the tiling scheme for an image with 4
,
096
×
4
,
096 pixels
is illustrated in Fig. 7.1 . The tiles consist of 256
256 pixels. The tiles are numbered
according to the rows and columns ( Y_X ). Following Eq. 7.1 , the number of tiles in
each row and column is 16 (4
×
256). The spatial extent of the tiles doubles (in
both X and Y) with each level, as can be shown for the levels 0-4 in Fig. 7.1 .
,
096
/
7.4 gdal2tiles.py
With gdal2tiles.py you can create a pyramid of PNG images. This Python
script is typically used for publishing maps on the web. Only RGB(A) raster files
with data type Byte are currently supported. Other formats should be converted first,
e.g., with gdal_translate (see Sect. 5.5 ) . In addition to the tiles, the directory
 
Search WWH ::




Custom Search