[GRASS-user] Rasterize polygons, multiple polygons per grid cell

Lars Dalby lars.dalby at gmail.com
Tue Oct 2 08:43:36 PDT 2012


Micha Silver wrote
> Here's the same query using db.select:
> echo 'SELECT a_row AS GridRow, a_col AS GridCol, SUM(clip_area) As 
> "Water Area in Grid" FROM glwd_grid GROUP BY a_cat ORDER BY a_row, a_col 
> LIMIT 20;' | db.select
> GridRow|GridCol|Water Area in Grid
> 9|43|11734990.811648
> 10|42|7600679.947002
> 10|43|20154750.823557
> 10|44|10095944.174832
> 10|46|18364623.744757
> 10|49|3054521.141835
> 11|41|250083.456892
> 11|42|9839134.964962
> 11|43|23519926.337785
> 11|44|11323614.28017
> 11|45|8426141.099425
> 11|46|12079532.459832
> 11|47|11135300.910967
> 11|49|571804.968053
> 11|50|1319664.199523
> 12|41|18036461.225015
> 12|42|15664405.025981
> 12|43|2471761.404269
> 12|45|2339714.549891
> 12|47|2890312.572311

So I got this now, but now I struggle with getting these summed values set
in at the right locations in the vector grid (or ideally a raster, which is
the ultimate goal).

I guess the idea is to create a new vector from the sql selection and then
rasterize this new map, but I am affraid I will have to ask for a hint once
again...

Thanks again
-Lars




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Rasterize-polygons-multiple-polygons-per-grid-cell-tp5005264p5005898.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list