[GRASS-user] Re: v.kernel -- how to get useful results

Markus Metz markus.metz.giswork at googlemail.com
Wed Feb 16 03:36:12 EST 2011


Aren Cambre wrote:
>> As soon as a raster map is accessed as input or output, the current
>> region settings are used (for most modules) as the extents and
>> resolution for any raster operations.
>
> If I have a GRASS vector map that is simply an import of PostGIS points (no
> attributes), is the region not the same as the entire map?

No, the region is independently controlled through g.region. When you
import something (raster or vector), the region is by default not
changed. See the corresponding manual pages:
http://grass.osgeo.org/grass64/manuals/html64_user/rasterintro.html
http://grass.osgeo.org/grass64/manuals/html64_user/g.region.html

> I looked over the g.region command, and I'm not clear how one gets from
> defining a region to v.kernel.

g.region vect=<name_of_a_points_vector> res=200 -a -p

The -a flag aligns the region to the resolution, the -p flag prints
the resulting region.

> v.kernel's documentation
> (http://grass.fbk.eu/gdp/html_grass64/v.kernel.html) is not clear on this
> point, and it appears that it just takes a vector map as input? Although,
> that being said, I'm confused about the input and net parameters. Is
> input actually a region and net actually the vector map?

Input is always a vector map with points, net is an optional input
vector map with lines for a network, e.g. if you want densities of
road accidents along a road network and not per grid cell.

> Also, how do I even define a region in the first place? Can I draw it using
> the map display? Or do I need to write down the coordinates as I hover my
> mouse over the NW and SE extents of the area of the vector I want to focus
> on?

I hope the above description is clear. Alternatively you can also set
the bounds and resolutions manually with g.region -p n= s= e= w=
nsres= ewres=

>
>>
>> In this case it may or may not desirable to run v.kernel on the whole
>> vector map, e.g. if you want to try different settings, rather use a
>> smaller region that covers only parts of the vector. Once you're happy
>> with the results, you can expand the region to cover the whole vector
>> with
>> g.region vect=<name_of_my_vector> -p
>
> When you say "the vector", is this some other vector map besides the map
> with my 2 million points?

I referred to your vector map with 2 million points.

Markus M


More information about the grass-user mailing list