Database Reference
In-Depth Information
IfyouareusingQGIS,youneedthePostGISrasterQGISplugintoreadand
writethePostGISraster.Thispluginmakesitpossibletoaddsinglerowsof
the tmax01 tableasasinglerasterorthewholetable.Trytoaddacoupleof
rows.
11. Asthelastbonusstep,youwillselectthe10countrieswiththelowestaver-
age max temperature in January (using the centroid of the polygon repres-
enting the country):
SELECT * FROM (
SELECT c.name, ST_Value(t.rast,
ST_Centroid(c.the_geom))/10 as tmax_jan
FROM chp01.tmax01 AS t
JOIN chp01.countries AS c
ON ST_Intersects(t.rast,
ST_Centroid(c.the_geom))
) AS foo
ORDER BY tmax_jan LIMIT 10;
The output is as follows:
Search WWH ::




Custom Search