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 6.10: <strong>The</strong> loading map parallel approach.<br />

For each rid in rids:<br />

Retrieve a layer from <strong>PostgreSQL</strong> using a connection string<br />

Try to add layer to qgis<br />

Come back to QGIS cursor<br />

Figure 6.11: Maps representing world climate [7] are loaded once time. <strong>The</strong>ir visibility is handled by<br />

turning on/<strong>of</strong>f the check boxes list.<br />

Media Control<br />

Each loaded map is identified by an ID. All map IDs are saved in a list layerIds. Only maps that have<br />

a time instant included in interval from Begin time to End time will be shown in the evolution. When<br />

the play media button is triggered, the first map that satisfies the time condition will be displayed.<br />

Subsequently, value in the Current time field is updated by time instant <strong>of</strong> the first map and the slider<br />

in the Time region moves by a step. Each step is at least equals the tick interval (by definition <strong>of</strong><br />

tick interval in the previous section). <strong>The</strong>n a QTimer ctimer is necessary to increase the time interval<br />

between two displayed maps instances. Otherwise, all maps that satisfy the time range condition will<br />

be displayed nearly at the same time and human eyes can not recognize the succession <strong>of</strong> the maps.<br />

Users can drag and drop the speed slider to change this time interval from 0.05s to 2s. After the<br />

ctimer is time out, it triggers the displaying function displayLayer to display the second map and so<br />

on until the final map is reach.<br />

Pseudo code <strong>of</strong> function playMedia:<br />

If a map satisfies the time condition<br />

Display the map<br />

Update current time field<br />

Move slider<br />

Trigger ctimer<br />

Pseudo code <strong>of</strong> function displayLayer:<br />

Retrieve a map from a map id<br />

Turn on the visibility <strong>of</strong> this map<br />

78

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

Saved successfully!

Ooh no, something went wrong!