Select to view content in your preferred language

Kernel density within boundaries?

4730
1
08-23-2013 02:03 AM
JohannaKollin
Occasional Contributor
Hi, I´ve been working with species data and I´m trying to make some kind of heatmap or just some sort of density map. I´ve tried a lot of methods (everything from interpolations to density maps) and the result I´m looking for would be a kernel density result. The only problem is that I it doesn´t support barriers or some sort of boundary. The thing is that my point data is plant species in water, so I need a result that won´t continue if there´s an island or other barrier in the way. In the attached picture my problem is demonstrated (circuled area). The Nodata area (white) is land and the points are the monitored points and the number is the number of keyspecies found. I´ve tried making the radius smaller but that will only work for some areas, not all and I can´t make it too small either. So to make my question really clear: is there a way (or tool) that can make a kernel density result within boundaries?

  [ATTACH=CONFIG]26909[/ATTACH]
1 Reply
curtvprice
MVP Alum
is there a way (or tool) that can make a kernel density result within boundaries?


The density calculation includes the area of your defined kernel in the denominator, so, technically, you can't get a valid value right next to the shoreline.

But, you can mask out cells that include land areas in your kernel:

First make a mask with Focal Statistics - with the NODATA option. If your kernel includes a NoData cell, you will get NoData out in kmask:

# Find cells with the kernel having all water cells
rad = 100
kern = NbrCircle(rad, "MAP")
kmask = FocalStatistics(water_raster, kern, "MAXIMUM", "NODATA")
# extract all cells with valid density values (ie kmask is not NoData) 
kdensity1 = ExtractByMask(kdensity, kmask)

If you have a smaller kernel, you don't lose as much area of valid densities.
0 Kudos