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.
access <strong>of</strong> any part <strong>of</strong> a single band. It can also handle any number <strong>of</strong> bands and accommodates black<br />
and white, grayscale, pseudocolor, true color and multi-spectral image data.<br />
Figure 4.43: Storing in-database raster.<br />
For example, the following SQL command will create a raster table containing two dummy rasters,<br />
each one is stored in a single row using BSQ:<br />
Create table dummy_rast(rid integer, rast raster);<br />
Insert into dummy_rast(rid, rast)<br />
Values (1,<br />
-- <strong>Raster</strong>: 0 band, Nodata = 0<br />
(’01’ -- little endian (uint8 ndr)<br />
||<br />
’0000’ -- version (uint16 0)<br />
||<br />
’0000’ -- nBands (uint16 0)<br />
||<br />
’0000000000000040’ -- scaleX (float64 2)<br />
||<br />
’0000000000000840’ -- scaleY (float64 3)<br />
||<br />
’000000000000E03F’ -- ipX (float64 0.5)<br />
||<br />
’000000000000E03F’ -- ipY (float64 0.5)<br />
||<br />
’0000000000000000’ -- skewX (float64 0)<br />
||<br />
’0000000000000000’ -- skewY (float64 0)<br />
||<br />
’00000000’ -- SRID (int32 0)<br />
||<br />
’0A00’ -- width (uint16 10)<br />
||<br />
’1400’ -- height (uint16 20)<br />
)::raster),<br />
-- <strong>Raster</strong>: 5 x 5 pixels, 3 bands, 8BUI pixel type, NoData = 0<br />
(2, (’01000003009A9999999999A93F9A9999999999A9BF000000E02B274A’ || ’410000000077195<br />
64100000000000000000000000000000000FFFFFFFF050005000400FDFEFDFEFEFDFEFEFDF9FAFEFEFC<br />
F9FBFDFEFEFDFCFAFEF’ || ’EFE04004E627AADD16076B4F9FE6370A9F5FE59637AB0E54F586170870<br />
40046566487A1506CA2E3FA5A6CAFFBFE4D566DA4CB3E454C5665’)::raster);<br />
51