Skip to content

Neighborhood filtering

1 message · Roland Löwe

#
Nice, thanks. That's what I'm looking for. 
It looks, like the for-loops may run faster (I tested on 10000 iterations of the above operation) but I'll try again  with the actual data.

------------------------------

Message: 11
Date: Tue, 23 Aug 2011 10:41:43 +0200
From: Mathieu Rajerison <mathieu.rajerison at gmail.com>
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] Neighborhood filtering
Message-ID:
	<CAGfc75kq3-LZt1GvPcQRi8OjD_2t1ok9ECEkCWWSkqWTgPZQzA at mail.gmail.com>
Content-Type: text/plain

Hi,

I think all you need is in raster package.

You could transform your matrix into a RasterLayer object

Then apply focalFilter function on your RasterLayer using your matrix of weights

http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=raster:focalFilter

Hope this helps

2011/8/23 Roland L?we <rolo at imm.dtu.dk>
------------------------------

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


End of R-sig-Geo Digest, Vol 96, Issue 21