<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><<a href="https://raw.githubusercontent.com/amuriy/GRASS-scripts/master/v.to.equidist" target="_blank">v.to.equidist</a>> addon doesn't work under GRASS 7 (only 6.4.*). But I still have plans to rewrite it in Python :) You could also try the addon <v.fixed.segmentpoints<span></span>>, it works similary.<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-08 20:10 GMT+03:00 Ken Nussear <span dir="ltr"><<a href="mailto:knussear@mac.com" target="_blank">knussear@mac.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div 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" type="cite">
<div style="margin:30px 25px 10px 25px"><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 src="cid:part1.04040603.03000902@mac.com" name="14d34b89945766cd_compose-unknown-contact.jpg" height="25px" width="25px"></div> <div style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a href="mailto:mlennert@club.worldonline.be" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">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">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 href="http://lists.osgeo.org/pipermail/grass-user/2011-October/062318.html" target="_blank">http://lists.osgeo.org/pipermail/grass-user/2011-October/062318.html</a>
<br>[2]
<a href="https://raw.githubusercontent.com/amuriy/GRASS-scripts/master/v.to.equidist" target="_blank">https://raw.githubusercontent.com/amuriy/GRASS-scripts/master/v.to.equidist</a>
<br>
<br></div>
</blockquote>
</div>
<br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div><br></div>