Greetings all,<br><div class="gmail_quote"><br>Summary: I would like to request that the v.distance function be updated (with a flag?) to allow reporting of multiple categories in one layer.<br><br>Example of why this can be important:<br>
I am working with historical forest fire data and want to extract histories for different points. I start with a shapefile that contains many (1000s) of polygons, many of which overlap in x-y space but vary over time (time information is in the attribute table). I could separate this into separate shapefiles (one for each year) prior to importing to GRASS, but this would result in almost 100 different layers and I would rather avoid it. When I import it into grass using v.in.ogr, it is topologically cleaned and the result is a layer of (intersected) polygons, many of which have multiple categories that link to the attribute table. For example, a single polygon could have burned in multiple years, so it is linked to multiple rows in the attribute table. These multiple categories are visible with "v.category -g input=fire option=print" which results in something like this:<br>
2452<br>2452/2540<br>2452/2526/2540/2543<br>2540/2575<br>2406/2420/2517/2563/2581/2584<br>2406/2420/2517/2563/2581<br>2416/2452/2536<br>Where each row is a unique polygon and the different elements are the various categories (rows in the attribute table) that are linked to it. So far so good. But what I want to do is extract the fire history for a number of points, but v.distance only reports the last category for each polygon (which in my case is usually only the most recent fire) and reports "<b>WARNING: more cats of to_layer</b>." So there seems to be a hidden ID value for each polygon (which would correspond to the invisible row number in the output above) but I cannot seem to access it directly. If I could, then it would be possible to v.distance to that ID, then use the output above to link a given point to several fire records. <br>
<br>If v.distance was updated to include multiple categories in the same layer, I would be able to do this easily. This has been proposed before: <a href="http://www.mail-archive.com/grass-user@lists.osgeo.org/msg02056.html" target="_blank">http://www.mail-archive.com/grass-user@lists.osgeo.org/msg02056.html</a>. I would like to encourage this revision (though maybe with a -m flag so you could turn this feature on if wanted). It would ideally (for me) return a table with multiple records for each point, each with an attribute from the polygon layer. For example, something like this:<br>
<br>point | fireyear<br>1 1950<br>1 1975<br>1 2002<br>2 1960<br>2 1972<br>3 1954<br><br>In the short term, does anyone have any ideas on how I can get extract this data?<br>
<br><br>Thanks for any ideas,<br><font color="#888888"><br>Adam Wilson<br><br></font></div>