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.
<strong>The</strong> final result is a set <strong>of</strong> geometry-pixel value pairs representing the shared portion <strong>of</strong> the geometric<br />
and the vectorization <strong>of</strong> the raster (Figure 4.54). This result is the same as the one obtained<br />
from the intersection(vector,vector) → vector operation.<br />
Example 2.4: A raster and raster intersection with a raster layer as a result.<br />
Figure 4.55: Mutual exclusive raster-raster intersection with a resulting raster layer [22].<br />
<strong>The</strong> same, the results are stored in multiband rasters as different disjoint objects as shown in Figure<br />
4.55. To obtain a result similar to the intersection(vector,vector) → vector operation, the resulting<br />
rasters must be vectorized.<br />
4.20 Temporal <strong>Raster</strong><br />
By definition, continuous fields are phenomena that are perceived as having a value at each point in<br />
space and time. Temporal raster, an extension <strong>of</strong> raster, is a new type designed to take into account<br />
the temporal aspect. In addition, a set <strong>of</strong> operations allowing interactions between this new type with<br />
date and time [2] are also implemented.<br />
<strong>PostgreSQL</strong> provides different languages to support new types defined by user, such as C, PL/pgSQL.<br />
PL/pgSQL is a procedural language that allows user to create new types, complex functions and etc.<br />
It is easy to learn and can do anything that can be done in C language. <strong>The</strong> rest <strong>of</strong> this section<br />
introduces the new temporal raster type and different functions built using PL/pgSQL.<br />
4.20.1 Structure<br />
Temporal raster is defined as a new composite data type based on raster type and timestamp type:<br />
st_rastertemp( rast raster, temp timestamp)<br />
4.20.2 Operations<br />
Operation ST_InTime is a constructor <strong>of</strong> temporal raster. It yields <strong>for</strong> each input raster, a<br />
corresponding temporal raster whose value is a pair <strong>of</strong> a timestamp instant and a raster value. A<br />
simple pseudocode <strong>for</strong> ST_InTime is shown below:<br />
Example:<br />
SELECT ST_InTime(raster, ’5/12/2011’)<br />
FROM rasterTable;<br />
Inversely, ST_Instant and ST_Value operations retrieve respectively the timestamp instant and<br />
the raster value <strong>of</strong> the input temporal raster.<br />
Example :<br />
SELECT ST_Instant(tempRast), ST_Value(tempRast)<br />
FROM temp<strong>Raster</strong>Table;<br />
59