13.07.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 3.2: <strong>PostGIS</strong> <strong>Raster</strong> data architecture.<br />

Everything is stored in a single attribute and raster attributes composing a table are not necessarily<br />

related to each other to <strong>for</strong>m a significant coverage.<br />

<strong>PostGIS</strong> <strong>Raster</strong> uses in addition a raster_columns table to contain in<strong>for</strong>mation about which<br />

tables have a raster column and the metadata (pixeltype, block size, nodata value and etc.) <strong>of</strong> the<br />

rasters in these columns.<br />

3.2.2 Physical Storage<br />

Geo<strong>Raster</strong> data consists <strong>of</strong> a multidimensional matrix <strong>of</strong> cells and the Geo<strong>Raster</strong> metadata. <strong>The</strong><br />

multidimensional matrix is blocked into small blocks. A block (or tile) is stored as a BLOB and a<br />

geometry object <strong>of</strong> type SDO\_GEOMETRY is used to define the spatial extent (footprint) <strong>of</strong> the block.<br />

Each block and in<strong>for</strong>mation related to that block are stored in one row. Thus <strong>for</strong> storing an image<br />

having size greater than block size, at least two rows are necessary to be used in Oracle database table<br />

[3].<br />

To do this, Geo<strong>Raster</strong> requires two types <strong>of</strong> object:<br />

• <strong>The</strong> SDO_GEORASTER type contains spatial extent geometry and metadata.<br />

• <strong>The</strong> SDO_RASTER contains a BOLB storing a block and the block in<strong>for</strong>mation.<br />

Each SDO_GEOMETRY data has a pair <strong>of</strong> attributes (rasterDataTable, rasterID) that identify the<br />

RDT and the rows within the RDT that are used to store the raster data.<br />

For Example, Figure 3.3 shows the storage <strong>of</strong> Geo<strong>Raster</strong> object used <strong>for</strong> an image <strong>of</strong> Boston,<br />

Massachusetts, where:<br />

• Each row in the table <strong>of</strong> city images contains in<strong>for</strong>mation about the image <strong>for</strong> a specific city<br />

(such as Boston), including an SDO_GEORASTER object.<br />

• <strong>The</strong> SDO_GEORASTER object includes the spatial extent geometry covering the entire area <strong>of</strong> the<br />

image, the metadata, the raster ID and the name <strong>of</strong> the raster data table associated with this<br />

image.<br />

• Each row in the raster data table contains in<strong>for</strong>mation about a block (or tile) <strong>of</strong> the image,<br />

including the block’s minimum bounding rectangle (MBR) and image data (stored as a BLOB).<br />

A MBR is defined as a single rectangle that minimally encloses a geometry or a collection <strong>of</strong><br />

geometries.<br />

In <strong>PostGIS</strong> <strong>Raster</strong>, the raster type is a complex type composed <strong>of</strong> many attributes like attribute,<br />

georeference in<strong>for</strong>mation, band in<strong>for</strong>mation and band data. Thus a single raster attribute can contain<br />

all in<strong>for</strong>mation about raster itself (width, height, number <strong>of</strong> bands, pixel type <strong>for</strong> each band, nodata<br />

21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!