Message: 5
Date: Tue, 22 Jun 2010 01:18:34 +0200
From: stn <stneumann@web.de>
Subject: [GRASS-user] Overlay vector map with points
To: Martin Landa <landa.martin@gmail.com>
Cc: grass list <grass-user@lists.osgeo.org>
Message-ID:
<AANLkTimdeuAo3MtmQSlhvoX7K98B63X6hsiR1j7tWF_o@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"Hi,
I have a vector-map with polygons and a set of points imported with
v.in.ascii, both in the same location and every point is in exactly one
polygon.Both maps seem to be ok, their data can be queried.
Now I would like to know which points lie in which polygon of the
vector-map.For two vector-maps overlaying worked fine. But with the polygons and the
points it does not seem to work. The maps can be overlayed but the
statistics of the combined map show the attributes of the polygons and empty
(though existing) columns for the attributes of the points.THX
stn
Hi,
You don't need to overlay the points and polygons to answer this question.
Add a column to the points map to contain a polygon attribute. For eg:
v.db.addcol <point map> columns="Polygon_Cat int"
Then v.distance to work out which polygon the point is in:
v.distance from=<point map> from_type=point to=<polygon map> to_type=area dmax=0 upload=to_attr column=Polygon_Cat to_column=cat
Richard