<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<div><br></div><div>I only recently started my adventure with GDAL and GIS in general, so please accept my apologies for perhaps maybe the most accurate formulation of the problem. I also did my best to find the answer already on this mailing list and outside, but to no avail - again possibly due to lack of experience. </div><div><br></div><div>Last year Hansen et al. prepared a detailed map, 30 meters resolution, of forest cover for the whole planet. The data is publicly accessible, both for online viewing and download. Both can be found here: <a href="http://earthenginepartners.appspot.com/science-2013-global-forest" target="_blank" style="font-size: 12pt;">http://earthenginepartners.appspot.com/science-2013-global-forest</a> The forest cover images are GeoTIFF and have pixel values in range [0, 100] that describes percentage of forest cover.</div><div><br></div><div>I have some georeferenced images that essentially are composed of ones and zeros, e.g.:</div><div>0 1 1 0 0</div><div>0 1 1 1 0</div><div>0 1 0 0 0</div><div>...</div><div><br></div><div>Those images are in 1000 meters scale and can spawn over whole continents. <span style="font-size: 12pt;">My aim is to calculate forest cover for them: wherever the value is "1", this pixel should be added to the forest cover. Say the Hansen image looks like this:</span></div><div>10 20 30 40 50</div><div>10 80 80 0 0</div><div>0 0 0 0 0</div><div>...</div><div><br></div><div>Then rows and column of this images should be multiplied by respective rows and columns of my own image, producing: </div><div>0 * 10 + 20 * 1 + 30 * 1 + 40 * 0 + 50 * 0 + 10 * 0 + 80 * 1 + ... = 210</div><div><br></div><div>Mind that scale of both images is different, so the example above is actually not accurate. The real calculations should average pixel values, then sum them and then convert to area.</div><div><br></div><div>Can anyone point me where to start? Maybe you know of any examples that could give me a hint?</div><div><br></div><div><br></div><div>Thanks,</div><div>Lucas</div> </div></body>
</html>