[GRASS-user] Points in a vector-map

Hi,

how can I identify which point lies in which polygon?

The points are in an ascii-table, each with latitude, longitude and some other attributes like name, altitude and id-number.
The vector-map is a map with political boundaries found in the vmap0-dataset at http://www.gdf-hannover.de/gis.php?id=5

THX,
stn

On Tue, Jun 29, 2010 at 9:25 AM, stn <stneumann@web.de> wrote:

Hi,

how can I identify which point lies in which polygon?

The points are in an ascii-table, each with latitude, longitude and some
other attributes like name, altitude and id-number.
The vector-map is a map with political boundaries found in the vmap0-dataset
at http://www.gdf-hannover.de/gis.php?id=5

I don't know an elegant solution to this but you may
create the list of polygon categories with v.categories and print method,
then loop over the polygons to run v.extract + v.select on each
extracted polygon.

Likely there are better solutions!

Markus

Or how about converting the polygons to raster and then run
v.what.rast to add a collumn with the polycon categorie value? Or even
better, v.what.vect?

Or did I misunderstand the question?

Daniel

On Wed, Jun 30, 2010 at 6:31 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Jun 29, 2010 at 9:25 AM, stn <stneumann@web.de> wrote:

Hi,

how can I identify which point lies in which polygon?

The points are in an ascii-table, each with latitude, longitude and some
other attributes like name, altitude and id-number.
The vector-map is a map with political boundaries found in the vmap0-dataset
at http://www.gdf-hannover.de/gis.php?id=5

I don't know an elegant solution to this but you may
create the list of polygon categories with v.categories and print method,
then loop over the polygons to run v.extract + v.select on each
extracted polygon.

Likely there are better solutions!

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

2010/7/1 Daniel Victoria <daniel.victoria@gmail.com>

Or how about converting the polygons to raster and then run v.what.rast to add a collumn with the polycon categorie value? Or even better, v.what.vect?

Or did I misunderstand the question?

Hi Daniel, hi Markus,

v.what.vector was the solution. Thank you.

I had been looking in completely the wrong place.

Previously I had successfully overlayed two vector maps and got all the intersecting polygons with all the attributes of both maps. Also somewhere I read that points are no longer treated as sites but also as vectors.

I concluded that points (imported with v.in.ascii) with attributes could also be overlayed with a vector map, resulting in a new map with the points having the attributes of the original points and all the attributes of the polygon in which they fall. That does not work (why not?). v.overlay simply returns the original polygons with existing but empty columns for the attributes of the points. It does not report any kind of error in the process.

So I tried to find a way to get v.overlay to work with points and never considered other solutions.

Thanks again,
stn

Daniel

On Wed, Jun 30, 2010 at 6:31 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Tue, Jun 29, 2010 at 9:25 AM, stn <stneumann@web.de> wrote:

Hi,

how can I identify which point lies in which polygon?

The points are in an ascii-table, each with latitude, longitude and some
other attributes like name, altitude and id-number.
The vector-map is a map with political boundaries found in the vmap0-dataset
at http://www.gdf-hannover.de/gis.php?id=5

I don’t know an elegant solution to this but you may
create the list of polygon categories with v.categories and print method,
then loop over the polygons to run v.extract + v.select on each
extracted polygon.

Likely there are better solutions!

Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user