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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ST_Present and ST_Passes predicates check whether a temporal raster is created respectively at<br />

an instant or a period <strong>of</strong> time.<br />

Example :<br />

SELECT ST_Present(tempRast, ’13/7/2001’::date)<br />

FROM temp<strong>Raster</strong>Table;<br />

SELECT ST_Passes(tempRast, ST_Range(’1/1/2008’, ’31/12/2011’))<br />

FROM temp<strong>Raster</strong>Table;<br />

Acting in the same way as ST_Present and ST_Passes but instead <strong>of</strong> returning a boolean,<br />

ST_AtInstant and ST_AtPeriods operations return the temporal raster values.<br />

Example :<br />

SELECT ST_AtInstant(tempRast, ’13/7/2001’::date)<br />

FROM temp<strong>Raster</strong>Table;<br />

SELECT ST_AtPeriods(tempRast,ST_Range(’1/1/2008’,’31/12/2011’))<br />

FROM temp<strong>Raster</strong>Table;<br />

In addition, there are also some aggregate functions [13] that execute on multiple temporal raster<br />

values. <strong>The</strong>se values are grouped together as input. <strong>The</strong> output is a single value computed based<br />

on certain criteria. An example <strong>of</strong> a simple aggregate function is ST_Sum that calculates the sum <strong>of</strong><br />

a sequence <strong>of</strong> temporal raster values. As each temporal raster is a matrix <strong>of</strong> values <strong>of</strong> each point in<br />

space at a time instant, the computation <strong>of</strong> the sum <strong>of</strong> this sequence goes back to the computation <strong>of</strong><br />

the sum <strong>of</strong> values <strong>of</strong> each corresponding point. <strong>The</strong> output is a summing raster.<br />

Pseudo code <strong>of</strong> ST_Sum:<br />

WHILE (band

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

Saved successfully!

Ooh no, something went wrong!