[GRASS-user] Spatial join of points to polygon

Dear all,

Unfortunately I am not really used to work with GRASS so this might be a rookie-question. But I am not able to solve it alone, don't find any hint on the net and thus will need your help:
I got a map of polygones and a map of points. My aim is to sum up the attributes of a defined column in the point-map to the polygone where they are lying in. So what I am looking for is a function saying 'spatial join' of polygons and points with the options 'contains' by using the function 'sum'. The only thing I can find will be v.what.vect. which will allow to give the point the value of the polygone, but not the other way round.

Is there a simple solution to that question within GRASS6.4? (I think QGIS is having this option, but I would like to solve it within GRASS6.4).

Thanks for your help!

Patrick

Patrick_schirmer wrote:

Dear all,

Unfortunately I am not really used to work with GRASS so this might be a
rookie-question. But I am not able to solve it alone, don't find any hint on
the net and thus will need your help:
I got a map of polygones and a map of points. My aim is to sum up the
attributes of a defined column in the point-map to the polygone where they
are lying in. So what I am looking for is a function saying 'spatial join'
of polygons and points with the options 'contains' by using the function
'sum'. The only thing I can find will be v.what.vect. which will allow to
give the point the value of the polygone, but not the other way round.

Is there a simple solution to that question within GRASS6.4? (I think QGIS
is having this option, but I would like to solve it within GRASS6.4).

Try v.vect.stats from grass-addons, this would do the job in one step,
optionally updating polygon attributes with statistics calculated on
point attributes per polygon.

svn checkout https://svn.osgeo.org/grass/grass-addons/vector/v.vect.stats

Markus M

v.vect.stats fits perfect to what I was looking for. Thanks a lot! Am using the GRASS-Version 6.4 coming out of UbuntuGIS(unstable) and didn't know about additional tools in the SVN that could be implemented. I guess the repository is not the latest version of GRASS, though.
That leads to a more general question installation practice for GRASS on Ubuntu. It seemed the simpliest way to install it though the UbuntuGIS-repository (apt-get/synaptics). An installation through the svn-branch would be more up-to-date, but this becomes a local installation and compatibility with the rest of my System would not be checked (please correct me if I am wrong here). What is your experience on this and what would be best-practice for a non-developer? Maybe somebody of the developers also knows how often the UbuntuGIS(unstable) repository is being updated concerning GRASS. This seems to be a relevant question for people who want to start with GRASS, as I just did.

Thanks and kind regards,

Patrick

On 27.08.2010 18:01, Markus Metz wrote:

Patrick_schirmer wrote:
   

Dear all,

Unfortunately I am not really used to work with GRASS so this might be a
rookie-question. But I am not able to solve it alone, don't find any hint on
the net and thus will need your help:
I got a map of polygones and a map of points. My aim is to sum up the
attributes of a defined column in the point-map to the polygone where they
are lying in. So what I am looking for is a function saying 'spatial join'
of polygons and points with the options 'contains' by using the function
'sum'. The only thing I can find will be v.what.vect. which will allow to
give the point the value of the polygone, but not the other way round.

Is there a simple solution to that question within GRASS6.4? (I think QGIS
is having this option, but I would like to solve it within GRASS6.4).

Try v.vect.stats from grass-addons, this would do the job in one step,
optionally updating polygon attributes with statistics calculated on
point attributes per polygon.

svn checkout https://svn.osgeo.org/grass/grass-addons/vector/v.vect.stats

Markus M

Patrick Schirmer wrote:

v.vect.stats fits perfect to what I was looking for. Thanks a lot! Am using
the GRASS-Version 6.4 coming out of UbuntuGIS(unstable) and didn't know
about additional tools in the SVN that could be implemented.

See
http://grass.osgeo.org/wiki/GRASS_AddOns

g.extension in GRASS6.4.0RC7 should be able to install add-ons, not
sure about RC6

I guess the
repository is not the latest version of GRASS, though.
That leads to a more general question installation practice for GRASS on
Ubuntu. It seemed the simpliest way to install it though the
UbuntuGIS-repository (apt-get/synaptics). An installation through the
svn-branch would be more up-to-date, but this becomes a local installation
and compatibility with the rest of my System would not be checked (please
correct me if I am wrong here).

You should remove the older GRASS version installed from the
UbuntuGIS-repository first, if you want to install e.g. a generic
weekly snapshot from here
http://grass.osgeo.org/grass64/binary/linux/snapshot/

Markus M

What is your experience on this and what
would be best-practice for a non-developer? Maybe somebody of the developers
also knows how often the UbuntuGIS(unstable) repository is being updated
concerning GRASS. This seems to be a relevant question for people who want
to start with GRASS, as I just did.

Thanks and kind regards,

Patrick

Markus Metz wrote:

Patrick_schirmer wrote:

Dear all,

Unfortunately I am not really used to work with GRASS so this might be a
rookie-question. But I am not able to solve it alone, don't find any hint
on
the net and thus will need your help:
I got a map of polygones and a map of points. My aim is to sum up the
attributes of a defined column in the point-map to the polygone where
they
are lying in. So what I am looking for is a function saying 'spatial
join'
of polygons and points with the options 'contains' by using the function
'sum'. The only thing I can find will be v.what.vect. which will allow to
give the point the value of the polygone, but not the other way round.

Is there a simple solution to that question within GRASS6.4? (I think
QGIS
is having this option, but I would like to solve it within GRASS6.4).

Try v.vect.stats from grass-addons, this would do the job in one step,
optionally updating polygon attributes with statistics calculated on
point attributes per polygon.

svn checkout https://svn.osgeo.org/grass/grass-addons/vector/v.vect.stats

Markus M