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.
Chapter 4<br />
<strong>PostGIS</strong> <strong>Raster</strong><br />
This section deals with representing raster structure and explaining from how raster is stored to<br />
the mechanisms used to index, retrieve raster in <strong>PostgreSQL</strong>. It is also important to address the way<br />
that raster and vector layers overlap - a relevant feature that makes <strong>PostGIS</strong> <strong>Raster</strong> more robust than<br />
ORACLE GEO<strong>Raster</strong>.<br />
4.1 Implementation<br />
<strong>PostGIS</strong> <strong>Raster</strong> chooses to implement a minimal raster data structure. That means that a raster<br />
type is as simple as a single type and is stored in a single table. This data structure is very similar<br />
to the one <strong>of</strong> <strong>PostGIS</strong> vector data and very different from the Oracle Spatial SDO_GEORASTER and<br />
SDO_RASTER raster structures. In <strong>PostGIS</strong> <strong>Raster</strong>:<br />
• One table with a column <strong>of</strong> type raster is referred to as a raster coverage.<br />
• One table row with a column <strong>of</strong> type raster corresponds to one tile.<br />
<strong>The</strong> choice <strong>of</strong> such simple data structure will facilitate the achievement <strong>of</strong> four objectives described<br />
in Chapter 3. With a single raster type, it implies that each raster attribute is a complete and self<br />
sufficient georeferenced raster. So raster attributes composing a table are not necessarily related to<br />
each other to <strong>for</strong>m a significant coverage. This also means that:<br />
• <strong>Raster</strong>s from the same table may have different size.<br />
• <strong>The</strong> upper left corner and the pixel size <strong>of</strong> a raster are not necessarily the same values as those<br />
<strong>of</strong> another rasters. <strong>The</strong>y may there<strong>for</strong>e snap to different grids.<br />
• Finally, different rasters may overlap like polygons in a vector layer may overlap. This is a<br />
fundamental feature to implement meaningful vector to raster conversions in which all attributes<br />
<strong>of</strong> a vector are conserved in the resulting raster table. In this case, if the vector features and the<br />
data values part <strong>of</strong> the resulting raster features do not necessarily overlap, the nodata values <strong>of</strong><br />
the raster features will overlap.<br />
In addition, <strong>PostGIS</strong> <strong>Raster</strong> provides also a raster_columns table to help application get a quick<br />
overview <strong>of</strong> raster tables and in<strong>for</strong>mation (such as metadata) related to the rasters stored in these<br />
tables.<br />
4.2 Structure<br />
<strong>PostGIS</strong> <strong>Raster</strong> implements only one type <strong>of</strong> raster instead <strong>of</strong> two like SDO_GEORASTER and<br />
SDO_RASTER in Oracle Spatial. It supports no metadata when a raster contains all data about itself<br />
such as attribute in<strong>for</strong>mation, georeference in<strong>for</strong>mation, band in<strong>for</strong>mation and band data. Figure<br />
?? describes these components in details [6]. As shown in this figure, a raster has no mask and<br />
27