<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Markus,<div>Hi all,</div><div><br></div><div>I created a zipped version of a test location including one PERMANENT mapset that includes the vector map that causes these inconsistencies (Ebro_river_vector_poly_clean_tmp). The test location can be downloaded from here: <a href="https://we.tl/t-eSUZqfP0TQ">https://we.tl/t-eSUZqfP0TQ</a>. I also included the initial vector map before running the v.clean tool (Ebro_river_vector_poly_tmp). More specifically, I am using following code:</div><div><br></div><div><div>grass.run_command("v.clean",</div><div>        overwrite=True,</div><div>        flags="c",</div><div>        input="Ebro_river_vector_poly_tmp",</div><div>        output="Ebro_river_vector_poly_clean_tmp",</div><div>        tool="break,rmdupl,rmline,rmsa,rmdangle",</div><div>        threshold="0,0,0,0,0.001")</div></div><div><br></div><div>Maybe this helps to find out what happens here.</div><div><br></div><div>/Johannes</div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 13, 2018 at 10:26 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br>On Thu, Sep 13, 2018 at 10:50 AM Johannes Radinger <<a href="mailto:johannesradinger@gmail.com" target="_blank">johannesradinger@gmail.com</a>> wrote:<br>><br>> Hi all,<br>><br>> I am a little bit puzzled about the actual number of lines/categories of a specific vector map (river network). As discussed yesterday, the output of v.category with the report option provides a column 'count' which is a feature count. Running v.category option=report on my vector provides me following:<br>><br>> v.category input=Ebro_river_vector_poly_clean_tmp@Ebro2_alien_spread option=report<br>> Layer/table: 1/Ebro_river_vector_poly_clean_tmp<br>> type       count        min        max<br>> point          0          0          0<br>> line         804          1       1053<br>> ....<br>><br>> This would indicate that I have 804 line features. However, using the tool <a href="http://v.info" target="_blank">v.info</a> on the same vector I get following different result regarding the number of lines:<br>> <a href="http://v.info" target="_blank">v.info</a> map=Ebro_river_vector_poly_clean_tmp@Ebro2_alien_spread                  <br>>  +----------------------------------------------------------------------------+<br>>  | Name:            Ebro_river_vector_poly_clean_tmp                          |<br>>  ...<br>>  |   Number of points:       0               Number of centroids:  0          |<br>>  |   Number of lines:        799             Number of boundaries: 0          |<br>> ... <br>><br>> And even more puzzling, I then added a table to this vector map and the output of v.db.addtable is:<br>> v.db.addtable map=Ebro_river_vector_poly_clean_tmp@Ebro2_alien_spread           <br>> Reading features...<br>> Updating database...<br>> 803 categories read from vector map (layer 1)<br>> 803 categories read from vector map don't exist in selection from table<br><div>> 803 records updated/inserted (layer 1)</div><div><br></div><div>If there are 804 features, 2 features must have the same category value, resulting in 803 updates to the database<br></div>><br><div>> So, is it 804,799 or 803??</div><div><br></div><div>The output of <a href="http://v.info" target="_blank">v.info</a> and v.category option=report must be identical with regard to the count of features.<br></div>><br>> The map I am using is a polyline river network (cat=first) that has gone trough the tool v.clean with the options: break,rmdupl,rmline,rmsa,rmdangle. The number of lines and cats before the cleaning tool is 805 (consistent output among all tools).<br>><br>> So I am wondering what happens during cleaning and how to get a clean map with a corresponding table that has entries for each cat, and were each cat represents one line feature (i.e. that the number of cats/line features is consistent over the multiple tools).<br>><br><div>> Please let me know if I should share the vector map (and how, which format).</div><div><br></div><div>Ideal would be a stripped down GRASS mapset with only this vector Ebro_river_vector_poly_clean_tmp. Exporting the vector would change the geometry representation and it would no longer be possible to reproduce the problem.</div><div><br></div><div>Markus M<br></div><br></div>
</blockquote></div>