<html><head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">Thanks very much, that is
all working well. I did try the addon you mention, but using grass7 it
wont install in either linux or mac os<br>
<br>
I'm having some trouble with the final layer though when trying to
sample a raster....<br>
<br>
<br>
Using this command <br>
<br>
v.what.rast map=TSELinesSplit500_w_lay2@PERMANENT type=centroid
raster=a250m_ATI@MojaveCovariates_250m column=RC1<br>
<br>
WARNING: No record for category 0 in table
<TSELinesSplit500_w_lay2><br>
<br>
Any idea why I have no category 0?<br>
<br>
Ken<br>
<blockquote style="border: 0px none;"
cite="mid:554B364F.7010701@club.worldonline.be" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="mlennert@club.worldonline.be" photoname="Moritz Lennert"
src="cid:part1.04040603.03000902@mac.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:mlennert@club.worldonline.be"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Moritz Lennert</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">May 7, 2015 at
2:54 AM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">On 06/05/15 22:12, knussear
wrote:
<br><blockquote type="cite">Interestingly 4 years later and using
V.split in grass7 and I'm still having
<br>the same problem....
<br>
<br>tried the v.category solution and the cats were never deleted.
<br></blockquote>
<br>Are you sure ? In the original thread, the check for success was
wrong
[1]: v.db.select checks the attached attribute table (which v.split does
not modify), not the categories present in the features.
<br>
<br>Here's a working example using a simple vector map with three lines:
<br>
<br>v.split test_line out=line_test_split length=5000
<br>
<br>v.category line_test_split op=report
<br>Layer/table: 1/line_test_split
<br>type count min max
<br>point 0 0 0
<br>line 46 2 4
<br>boundary 0 0 0
<br>centroid 0 0 0
<br>area 0 0 0
<br>face 0 0 0
<br>kernel 0 0 0
<br>all 46 2 4
<br>
<br>Now, two options:
<br>
<br>1) You want to keep the category values of the original lines, but
also
add individual category values for the new segements. Here GRASS's layer
paradigm comes in handy, allowing you to create a second layer of
information:
<br>
<br>#create second information layer containing new individual category
values for the segments
<br>v.category line_test_split out=line_test_split_w_lay2 layer=2 op=add
<br>
<br>v.category line_test_split_w_lay2 op=report
<br>Layer/table: 1/line_test_split_w_lay2
<br>type count min max
<br>point 0 0 0
<br>line 46 2 4
<br>boundary 0 0 0
<br>centroid 0 0 0
<br>area 0 0 0
<br>face 0 0 0
<br>kernel 0 0 0
<br>all 46 2 4
<br>Layer/table: 2/line_test_split_w_lay2_2
<br>type count min max
<br>point 0 0 0
<br>line 46 1 46
<br>boundary 0 0 0
<br>centroid 0 0 0
<br>area 0 0 0
<br>face 0 0 0
<br>kernel 0 0 0
<br>all 46 1 46
<br>
<br>Now you can add a new attribute table to the second layer:
<br>
<br>v.db.addtable line_test_split_w_lay2 layer=2
<br>
<br>If you want to integrate the old categories (or anything else from
the
original attribute table) into the attribute table of the new segments:
<br>
<br>v.db.addcolumn line_test_split_w_lay2 col="old_cat int" layer=2
<br>v.to.db line_test_split_w_lay2 layer=2 query_layer=1 op=query
query_col=cat col=old_cat
<br>
<br>v.db.select line_test_split_w_lay2 layer=2
<br>cat|old_cat
<br>1|2
<br>2|2
<br>3|2
<br>4|2
<br>5|2
<br>6|2
<br>7|2
<br>8|2
<br>9|2
<br>10|2
<br>11|2
<br>12|2
<br>13|2
<br>14|2
<br>15|2
<br>16|2
<br>17|3
<br>18|3
<br>19|3
<br>20|3
<br>21|3
<br>etc...
<br>
<br>2) You just need the segments with individual category values, but
not
the old line categories, nor the old attribute table:
<br>
<br>#delete old cats, don't keep old attribute table to avoid confusion
<br>v.category -t line_test_split op=del cat=-1
out=line_test_split_wo_cats
<br>
<br>#add new cats
<br>v.category line_test_split_wo_cats out=line_test_split_w_new_cats
op=add
<br>
<br>#now, if necessary create new attribute table prefilled with cat
values
<br>v.db.addtable line_test_split_w_new_cats
<br>
<br><blockquote type="cite">My system
<br>will also not install the v.to.equidist add on.
<br></blockquote>
<br>Which version of GRASS are you using. The addon was developed for
GRASS 6.
<br>
<br>It is a simple shell script which you can download from [2], but I
haven't checked if it will run as-is in GRASS 7
<br>
<br>
<br>Moritz
<br>
<br>[1]
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/pipermail/grass-user/2011-October/062318.html">http://lists.osgeo.org/pipermail/grass-user/2011-October/062318.html</a>
<br>[2]
<a class="moz-txt-link-freetext" href="https://raw.githubusercontent.com/amuriy/GRASS-scripts/master/v.to.equidist">https://raw.githubusercontent.com/amuriy/GRASS-scripts/master/v.to.equidist</a>
<br>
<br></div>
</blockquote>
</body></html>