PostGIS Raster : Extending PostgreSQL for The Support of ... - CoDE
PostGIS Raster : Extending PostgreSQL for The Support of ... - CoDE
PostGIS Raster : Extending PostgreSQL for The Support of ... - CoDE
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
"32BUI" = 32-bit unsigned integer<br />
"32BF" = 32-bit float<br />
"64BF" = 64-bit float<br />
4.9 Nodata Values<br />
Cell values can be either positive or negative, integer or floating point. A noData value is used<br />
to represent cell values that are either unknown or meaningless. In the other words, a noData value<br />
represents the absence <strong>of</strong> data. Sometimes there are areas in a raster that user does not want to<br />
display. <strong>The</strong>se can include borders, backgrounds or other data considered to not have valid values. In<br />
some cases, these areas are expressed as noData values, although in the other cases, they may have<br />
real values.<br />
When per<strong>for</strong>ming operations on raster data, there are typically two ways that noData are treated<br />
<strong>for</strong> each cell: noData value is returned <strong>for</strong> the position <strong>of</strong> corresponding cell, noData is ignored and<br />
can not be computed. So when calculating the statistics <strong>for</strong> a raster, user can decide to ignore or not<br />
any cells with noData value.<br />
Any analysis functions in <strong>PostGIS</strong> <strong>Raster</strong> always takes the nodata value into account. This means<br />
that the areas with nodata value will be omitted from the operation. For example in intersection<br />
operation, if a vector completely overlaps a nodata value area <strong>of</strong> one tile, the operation will set false<br />
<strong>for</strong> this tile and vector intersection and returns an EMPTY GEOMETRY result [8]. If the vector partially<br />
overlaps a nodata value area and intersect other parts <strong>of</strong> the tile, the operation will set true <strong>for</strong> this<br />
intersection and returns only parts <strong>of</strong> the tile with significant values, omitting parts with nodata<br />
values.<br />
Each raster band has its own noData value whose range depends on the associated band pixel<br />
type. <strong>The</strong> noData value is specified in the band in<strong>for</strong>mation (see Figure ??).<br />
4.10 Blocks or Tiles<br />
When importing a raster image into <strong>PostGIS</strong> database, users can choose to split the raster into<br />
small regular blocks by adding the -k option to the raster2pgsql.py Python loader, otherwise the<br />
entire raster is loaded into a single block. <strong>The</strong> block size is a parameter that follows just after the<br />
option -k (such as 128x128). All blocks are registered in a regular blocked table.<br />
Each block is stored in a row <strong>of</strong> the table and contains all data about itself (such as attribute<br />
in<strong>for</strong>mation, georeference in<strong>for</strong>mation, band in<strong>for</strong>mation and band data) as the mother raster, except<br />
its size is equal the size <strong>of</strong> mother raster divided by block size. So each block by definition can be<br />
identified as a tile. This also means that in <strong>PostGIS</strong> <strong>Raster</strong>, there are no difference between rasters,<br />
tiles and blocks.<br />
Sometimes, the dimension size (row and column) <strong>of</strong> the mother raster may not be evenly divided<br />
by the block size. <strong>PostGIS</strong>T <strong>Raster</strong> adds padding to the boundary blocks that do not have enough<br />
original cells to be completely filled. <strong>The</strong> padding cells have the same cell type as other cells and have<br />
values equal to zero. Padding makes each block have the same block size.<br />
Figure 4.28: <strong>Raster</strong> tiles [23].<br />
42