<div class="gmail_quote"><div>Hi there,</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"></div>
You can use v.distance with dmax=0 to do such a "spatial join" between polygons and points:<br>
<br>
v.db.addcolumn YourCentroids col='poly_cat int'<br>
v.distance from=YourCentroids to=YourPolygons upload=cat column=poly_cat dmax=0<br>
<br>
This should upload the category values of your polygons to the attribute value of your centroids. If you then want to join the two tables, you can use v.db.join.<br></blockquote><div><br></div><div>That sounds like a good idea, I'll try that out.</div>
<div><br></div><div>Hamish, I'm running 6.4RC1 from the Geo repository on OpenSUSE 11.4. Thanks for the tip, though, I'll report back on the "spatial join" and if it doesn't work with the polygons and points then I'll try compiling RC2. I'm always kind of nervous about compiling stuff, but it's never quite as painful as I think it'll be :)</div>
</div>