Database Reference
In-Depth Information
arwithpyramids,anoverviewisleveloneofapyramidwhilethesourcerasteristhe
base level.
WITH meta AS (
SELECT
(ST_Metadata(rast)).*
FROM modis
)
SELECT
ST_Rescale(modis.rast, meta.scalex *
4., meta.scaley * 4., '
cubic') AS rast
FROM modis
CROSS JOIN meta;
Theoverviewis25percentoftheresolutionoftheoriginalMODISraster.Thismeans
fourtimesthescaleandone-quarterthewidthandheight.Topreventhardcodingthe
desiredscaleXandscaleY,weusetheMODISraster'sscaleXandscaleYreturned
by ST_Metadata() .Asyoucanseeinthefollowingscreenshot,theoverviewhas
a coarser resolution.
The MODIS raster before and after rescaling with ST_Rescale()
Note
The rescaled raster is more pixelated due to the reduction of resolution.
Search WWH ::




Custom Search