Opened 14 years ago

Closed 11 years ago

#1130 closed enhancement (fixed)

Request for a v.count.points grass module

Reported by: nikos Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Vector Version: svn-trunk
Keywords: count points in areas, v.count.points.sh, v.what.vect, v.distance Cc:
CPU: All Platform: All

Description

Currently there is no dedicated grass module to return the number of points that fall inside an area. Although there is a specific function to check if points fall within an area [1], the task is performed indirectly using v.what.vect [2] (which in turn is a wrapper to v.distance) in a script (e.g. v.count.points.sh [3]). Indirect methods (such as the previously mentioned script) work fine but take (impractically) too long when using (very) large point and area vector maps.

Counting points is rather a common task within the framework of GIS. Therefore, it probably makes sense to have a native (faster and easy to use) grass module that returns the number of points within area(s) and optionally carry over attributes from the area to the point map (like v.what.vect) or/and vice versa. Potentially, such a module can replace completely the v.what.vect script (?).

A discussion upon the subject is to be found in the grass-dev mailing list [4].

[1] http://grass.osgeo.org/programming7/vector_2Vlib_2area_8c.html#a20344aaee88bf684dccdd2071da0851d
[2] http://svn.osgeo.org/grass/grass/trunk/scripts/v.what.vect/
[3] http://wiki.iosa.it/dokuwiki/spatial_analysis:feature_count
[4] http://lists.osgeo.org/pipermail/grass-dev/2010-August/051471.html

Change History (3)

comment:2 by hamish, 14 years ago

CPU: UnspecifiedAll
Milestone: 7.0.0
Platform: UnspecifiedAll
Version: unspecifiedsvn-trunk

see also the internals of the v.random.cover addon script.

v.extract + v.info -t ?

Hamish (out-of-office)

comment:3 by nikos, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.