<div dir="ltr"><div><br><br>On Thu, Oct 19, 2017 at 8:38 PM, Eric Patton <<a href="mailto:thepattonian@gmail.com">thepattonian@gmail.com</a>> wrote:<br>><br>> Hi,<br>><br>> I have created a point vector from a coastline using v.to.points:<br>><br>> v.to.points input=CanCoast_Shoreline type=line output=CanCoast_Shoreline_points use=vertex --v <br>><br>> This works fine, and the next thing I want to do is upload raster slope values from a DEM to the attribute table of the points vector using v.what.rast, but I get tons of warnings like these:<br>><br>> WARNING: Multiple points (12) of category 16, value set to 'NULL'<br>><br>> I assume this is telling me the points have duplicate categories? <br><br></div>Exactly. From the manual of v.to.points:<br>"The output is a vector map with 2 layers. Layer 1 holds the category
of the input features; all points created along the same line have the
same category, equal to the category of that line. In layer 2 each
point has its unique category"<div><br></div><div>The solution is to upload values to layer 2 with v.what.rast layer=2<br></div><div>><br>> So to get around this, I tried recreating the points, this time without an attribute table, using v.to.points -t, then adding the table and categories manually:<br></div><div><br></div><div>With v.to.points -t, the category values are already there, but not the tables.<br></div><div><br></div><div>HTH,</div><div><br></div><div>Markus M</div><div><br></div><div>><br>> v.to.points input=CanCoast_Shoreline type=line output=CanCoast_Shoreline_points use=vertex -t --v --o<br>> v.db.addtable map=CanCoast_Shoreline_points columns="Slope_percent integer"<br>> v.category input=CanCoast_Shoreline_points option=add output=CanCoast_Shoreline_points_with_cat<br>><br>> But running v.what.rast still gives me the same error as before.<br>><br>> I ran v.categories in report mode to see what is going on:<br>><br>> v.category input=CanCoast_Shoreline_points_with_cat option=report<br>> Layer/table: 1/CanCoast_Shoreline_points_with_cat<br>> type count min max<br>> point 105427 1 1692<br>> line 0 0 0<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 105427 1 1692<br>> Layer: 2<br>> type count min max<br>> point 105427 1 105427<br>> line 0 0 0<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 105427 1 105427<br>><br>> Where did the two layers come from? I thought v.to.points -t *wasn't* supposed to make an attribute table. And the fact that the 'max' value reported above is '1692' seems to be a hangover from the line features they were created from. <br>><br>> In this case, I don't care about the IDs or categories of the lines the points originated from; I want unique categories for the 105427 points that were made so I can then successfully run v.what.rast and upload my DEM slope values.<br>><br>> It's been a while since I've used these tools, so I'm a little rusty. Is there a way to do this?<br>><br>><br>> ~ Eric.<br>><br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a><br><br></div></div>