Hello list. I am continuing to struggle with update/manipulation of vector categories between the dbf and vector file. Perhaps if I state what I am trying to do, someone can help me out. I am using latest wingrass 6.4 binary on XP.<br>
<br>I have some vector points file created by v.mkgrid where the points are regularly spaced at various grid intervals and orientations. I have used v.buffer to make a new vector file from these points where there are small circular buffers around each point. I have a few base vector points maps that I genertated using several tools (including v.random, v.perturb, and others) where there are clusters of points at varying densities across the region. These base maps are to simulate the spread of small pieces of refuse on an archaeological site, and the grids of circular buffers represent different sampling strategies. The idea is to be able to count the number of objects within each sample circle and use that to interpolate a density surface (first change the random points base map to raster and then use v.rast.stats with the sample circles map so that count will be in column &quot;n&quot;). The resulting density surfaces will be compared with the real point density map to see which sampling strategy works best.<br>
<br>My main problem at the moment is that I need to have a row for each sampling point/circle in the dbf of the sampling maps. The points in the points maps made by v.mkgrid each have their own cat number. After running v.buffer to make circular areas around each point, all circular areas have cat=1. Each circle has it&#39;s own unique feature ID, but all have category = 1. I know I should to be able to make each vector object have it&#39;s own unique category number. Then I could run v.to.db and update the cat column in the dbf with these unique cats, and I would be good to go forward from this step. But I can&#39;t get the circles to have unique cats!!!! I&#39;ve run v.category in every way imaginable, but I cannot get it to do what I want! It continues to produce new maps where all the vector points or centroids all share the SAME cat number! I&#39;ll post the output of v.category below. If v.category doesn&#39;t work to do this then how can I get sequential cat numbers? This seems like such a simple simple thing. Shouldn&#39;t be possible to somehow just read the feature ID&#39;s into the category for each object? Please let me know if I&#39;m doing something wrong, or let me know if GRASS just can&#39;t do this.<br>
<br>Okay, here is the output of v.category. First report existing cat numbers:<br><br><span style="font-family: courier new,monospace;">v.category input=tril_lattice_1m_eq_5cm_RAD_CIRCS@1m_trilattice option=report type=centroid</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Layer/table: 1/tril_lattice_1m_eq_5cm_RAD_CIRCS</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">type       count        min        max</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">point          0          0          0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">line           0          0          0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">boundary       0          0          0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">centroid     159          1          1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">area           0          0          0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">all          159          1          1</span><br>
<br>See: all have category = 1. Okay now try to overwrite cats following the logic from the man page (&quot;If the <b>type</b> parameter is set to <b>centroid</b> and the <b>option</b> 
parameter set to <b>add</b>, new categories will be added to existing centroids.&quot;). So I do this:<br>                                                  <br>                                                    <br><span style="font-family: courier new,monospace;">v.category --overwrite input=tril_lattice_1m_eq_5cm_RAD_CIRCS@1m_trilattice output=tril_lattice_1m_eq_5cm_RAD_CIRCS_cats_added@1m_trilattice type=centroid</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Vector map &lt;tril_lattice_1m_eq_5cm_RAD_CIRCS_cats_added&gt; already exists and will be overwritten</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Processing features...</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Copying attribute table(s)...</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Building topology for vector map &lt;tril_lattice_1m_eq_5cm_RAD_CIRCS_cats_added&gt;...</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Registering primitives...</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">318 primitives registered</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">3975 vertices registered</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Building areas...</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">159 areas built</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">159 isles built</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Attaching islands...</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Attaching centroids...</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Number of nodes: 318</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Number of primitives: 318</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Number of points: 0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Number of lines: 0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Number of boundaries: 159</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Number of centroids: 159</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Number of areas: 159</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Number of isles: 159</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">v.category complete. <b>0 features modified.</b></span><br><br>It does nothing. I emboldened where it says &quot;0 features modified&quot;. To be sure, I run report on the new vector map:<br>
                                                <br><span style="font-family: courier new,monospace;">v.category input=tril_lattice_1m_eq_5cm_RAD_CIRCS_cats_added@1m_trilattice option=report type=centroid</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Layer/table: 1/tril_lattice_1m_eq_5cm_RAD_CIRCS_cats_added</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">type       count        min        max</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">point          0          0          0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">line           0          0          0</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">boundary       0          0          0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">centroid     159          1          1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">area           0          0          0</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">all          159          1          1</span><br>
<br>See. It keeps all category = 1!<br><br>So, how can I make all 159 individual areas have unique category numbers?!?!?<br><br><br><br>PS. As an aside, now that I have for the first time really started to
work with the vector tools in GRASS, I am noticing that they are very
very confusing to use. The documentation is a bit sparse, and the
interfaces don&#39;t make much intuitive sense. And it is very difficult to
do simple things like make an attribute table with rows for each vector
object. These kinds of basic operations take multiple steps and
sometimes I just can&#39;t make them work...<br><br>Cheers,<br><br>Isaac<br clear="all"><br>-- <br>Isaac I Ullah, M.A.<br><br>Archaeology PhD Candidate,<br>ASU School of Evolution and Social Change<br><br>Research Assistant,<br>
Mediterranean Landscape Dynamics Project<br>***************************************************<br><a href="mailto:isaac.ullah@asu.edu">isaac.ullah@asu.edu</a><br><a href="mailto:ullah@archaeologist.com">ullah@archaeologist.com</a><br>
<br><a href="http://www.public.asu.edu/~iullah">http://www.public.asu.edu/~iullah</a><br>***************************************************<br>