Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am flummoxed on how to use GRASS's v.kernel.

I have a vector layer of around 2.5 million points. I want to make a heat map using v.kernel to show concentrations, since I have variable instances with overlapping points, sometimes huge overlaps.

I've already gotten this vector layer in GRASS, and it displays just fine.

I've tried using GRASS's v.kernel command based on what I've seen here and on other forums, and I can't get it to do anything besides output a raster that's just a pink square.

Here's the command I'm using:

v.kernel --verbose input=master_grass7 output=master_grass7a_heatmap stddeviation=.0001

I've varied the stddeviation to all sorts of values from 1000000 to .000001, and it had no effect.

I've read the v.kernel documentation repeatedly and don't really understand what it's getting at. At least, the instructions are on esoteric concepts, nothing practical. I've also checked the source code, and I'm not really understanding it, either. Yes, I can read C. The problem is it depends on a lot of stuff defined elsewhere in GRASS GIS.

I've also done a lot of Google searching, and I can't find a comprehensive guide. All that I'm getting are scattered copies of the v.kernel doc/man page or people who apparently got it to work without a fuss.

I've also checked up on the concept of kernel density estimation (KDE), and even then I don't see how to use the v.kernel command. That command appears to be a specific interpretation of KDE; its switches don't appear to correspond well to generic KDE concepts.

So back to the main question here: how can someone who is not intimate with GRASS product development use the v.kernel command? Is there a plain language translation available?

share|improve this question

migrated from meta.gis.stackexchange.com Feb 15 '11 at 10:35

This question came from our discussion, support, and feature requests site for cartographers, geographers and GIS professionals.

add comment

1 Answer

up vote 9 down vote accepted

The v.kernel algorithm calculates the density of vector points for each cell of a raster map. If you so far have only been using vector objects, chances are that you have not set up your region (which not only defines the extents, but also the raster resolution) adequately: You probably have your region set to only one row and one column, which means the v.kernel algorithm will only compute the kernel density as a single value over the whole map. A region setting like this is fine if you do not use any raster maps, because the vector maps don't care about the resolution settings. Check your region settings using g.region -p, and if rows and cols is set to 1, increase the resolution by using

g.region rows=<number of rows> cols=<number of columns>

or

g.region res=<length>

where <length> is the length of a resolution cell in map units.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.