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 4.37: Tiled images (2 tables <strong>of</strong> 54 tiles) [6].<br />

6. A raster table may be a raster coverage resulting from any analysis operations (such as ST_AsPolygon(),<br />

ST_Intersection()) that imply rasterization <strong>of</strong> a vector coverage. From the rasterization, each<br />

vector feature becomes a small raster with the same extent as the original vector feature. This<br />

type <strong>of</strong> coverage is not necessarily complete nor rectangular. Tiles should be <strong>of</strong> different sizes<br />

and might overlap. It all depends on the characteristics <strong>of</strong> the vector layer being rasterized. For<br />

example, a continuous layer <strong>of</strong> mutual exclusive geometries (without gaps or holes like a <strong>for</strong>est<br />

cover) would result in a raster coverage in which significant pixels (with data values) would not<br />

overlap, but non-significant pixels (nodata values) would. On the other end, a discontinuous<br />

layer <strong>of</strong> mutual exclusive geometries (like a lake or building layer) would result in a coverage <strong>of</strong><br />

mostly disjoint raster objects. In practice, this arrangement is identical to a vector layer in the<br />

sense that all pixels <strong>of</strong> each raster have the same value.<br />

Figure 4.38: <strong>Raster</strong> object coverage (9 raster objects corresponding 9 rows in a raster table) [6].<br />

All these arrangements are possible and <strong>PostGIS</strong> <strong>Raster</strong> does not impose one over the other even<br />

though types 3. and 4. and 6. are the most practical <strong>for</strong> a GIS analyst. This is due to the fact<br />

that users might add or delete rows (or tiles) <strong>of</strong> a raster table and <strong>PostGIS</strong> <strong>Raster</strong> must support<br />

variable-sized tiles <strong>for</strong> vector to raster conversion. So it is very difficult to en<strong>for</strong>ce a certain type<br />

<strong>of</strong> configuration.<br />

<strong>The</strong> raster arrangements play a fundamental role in implement meaningful vector to raster<br />

conversion (see Section 4.18), where all attributes <strong>of</strong> a vector are conserved in the resulting<br />

raster table. Example, 10 lake vector features with attributes like name, type, area and etc. are<br />

converted to 10 lake raster features with the same attributes. In this case, if the vector features<br />

and the data values, part <strong>of</strong> the resulting raster features do not necessarily overlap, the nodata<br />

values <strong>of</strong> the raster features will overlap (see Figure 4.39). <strong>The</strong>se characteristics enable an easy<br />

integration <strong>of</strong> raster with vector.<br />

In <strong>PostGIS</strong>, the conversion from raster to vector can be done using ST_DumpAsPolygons() function<br />

as shown in Figure 4.40. So it is not matter whether the layers are in raster or vector <strong>for</strong>mat<br />

47

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

Saved successfully!

Ooh no, something went wrong!