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.
For each loaded map<br />
Turn the map on MultiBandSingleBandPseudoColor mode<br />
Set the chosen band as the band to be displayed<br />
Set PseudoColorShader as color shading algorithm <strong>for</strong> the map<br />
6.3.2 Color Legend<br />
Figure 6.16: Visualisation <strong>of</strong> band number 2 <strong>of</strong> a multi band map.<br />
<strong>The</strong> most important function in color legend construction is compute<strong>Raster</strong>Stats. It computes the<br />
minimum and the maximum pixel values from a set <strong>of</strong> temporal rasters (or maps). In fact, these values<br />
are resulted from <strong>PostgreSQL</strong> through a connection. For instance, the minimum pixel value is computed<br />
from the request SELECT min((ST_SummaryStats((rtt).rast)).min) FROM temporal<strong>Raster</strong>Table<br />
(the temporal raster table is described in the interface Section). <strong>The</strong> (ST_SummaryStats((rtt).rast)).min)<br />
part gives, <strong>for</strong> each temporal raster in the temporal<strong>Raster</strong>Table, a corresponding minimum pixel value.<br />
Hence, the min((ST_SummaryStats((rtt).rast)).min) gives the minimum value <strong>of</strong> a set <strong>of</strong> minimum<br />
values according to the definition <strong>of</strong> the minimum pixel value <strong>of</strong> a set <strong>of</strong> temporal rasters.<br />
Each color palette is provided from an external tbl file. <strong>The</strong> tbl file describes a RGB triple <strong>of</strong><br />
color in each row. Hence the number <strong>of</strong> possible colors <strong>of</strong> a color palette is the number <strong>of</strong> lines used<br />
to code colors. Example <strong>of</strong> a tbl file is something like:<br />
"{ r g b }<br />
102 47 0<br />
153 96 53<br />
..."<br />
Each time, when users choose a color palette from Color legend window, the in<strong>for</strong>mation related<br />
to this palette, such as the number <strong>of</strong> colors, the RGB values array and the real data values, is saved<br />
respectively into three variables nColo, arColo and arColV. <strong>The</strong> creation <strong>of</strong> a color legend file (a PNG<br />
file) implies the use <strong>of</strong> these variables, along with the minimum and maximum pixel values <strong>of</strong> a set <strong>of</strong><br />
temporal rasters. For instance, the number <strong>of</strong> colors decides the color legend length, where each RGB<br />
color is painted as a color ligne. <strong>The</strong> tick notations are given by variable arColV. <strong>The</strong> number <strong>of</strong> tick<br />
notations depends on the number <strong>of</strong> colors that a palette has. If it has less than 10, the number <strong>of</strong> tick<br />
notations is equal to the number <strong>of</strong> available colors. Otherwise, it will be a fixed number and equal<br />
to 10. In this case, the number <strong>of</strong> colors between two tick notations is the division <strong>of</strong> the number <strong>of</strong><br />
colors by 10.<br />
81