[GRASS-SVN] r71604 - grass-addons/grass7/vector/v.profile

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 29 03:16:53 PDT 2017


Author: marisn
Date: 2017-10-29 03:16:53 -0700 (Sun, 29 Oct 2017)
New Revision: 71604

Modified:
   grass-addons/grass7/vector/v.profile/main.c
   grass-addons/grass7/vector/v.profile/v.profile.html
Log:
Enhance documentation by providing an example based on NC Basic dataset


Modified: grass-addons/grass7/vector/v.profile/main.c
===================================================================
--- grass-addons/grass7/vector/v.profile/main.c	2017-10-28 14:00:43 UTC (rev 71603)
+++ grass-addons/grass7/vector/v.profile/main.c	2017-10-29 10:16:53 UTC (rev 71604)
@@ -212,8 +212,8 @@
 
     /* Get buffer size */
     bufsize = fabs(atof(buffer_opt->answer));
-    if (bufsize < 0)
-        G_fatal_error(_("Tolerance value can not be less than 0"));
+    if (! (bufsize > 0))
+        G_fatal_error(_("Tolerance value must be greater than 0"));
 
     /* If new map name is provided, it has to be useable */
     if (new_map->answer != NULL)
@@ -507,7 +507,7 @@
     }
 
     /* Process all lines IF no database exists or WHERE was not provided.
-       Read in single line and get it's type */
+       Read in single line and get its type */
     if (Fi == NULL || (where_opt->answer == NULL && Fi != NULL)) {
         while ((type = Vect_read_next_line(&In, Points, Cats)) > 0) {
             if (type & GV_POINT) {

Modified: grass-addons/grass7/vector/v.profile/v.profile.html
===================================================================
--- grass-addons/grass7/vector/v.profile/v.profile.html	2017-10-28 14:00:43 UTC (rev 71603)
+++ grass-addons/grass7/vector/v.profile/v.profile.html	2017-10-29 10:16:53 UTC (rev 71604)
@@ -25,28 +25,29 @@
 
 <h2>EXAMPLES</h2>
 
-Get point values and distance from the city and save into file for
-later usage. We will use comma as delimiter and three numbers after decimal
+List all geonames along part of road NC-96 (NC Basic dataset).
+The output will be stored in a file for later usage.
+We will use comma as delimiter and three numbers after decimal
 separator for distance. Output file will contain data for all points,
-that are within 100m range to profiling line (Spearfish dataset).
+that are within 500 m range to profiling line.
 
 <div class="code"><pre>
-# Spearfish sample dataset
-v.profile input=archsites map_output=profiling_line buffer=100 \
-          east_north=591518.55,4925722.38,592110.14,4920989.67 \
-	  output=archsites_distance.csv dp=3 separator=comma
+v.profile input=geonames at PERMANENT output=/home/user/NC_96_geonames.csv\
+  separator=comma dp=3 buffer=500 profile_map=roadsmajor at PERMANENT profile_where=cat=56
 
-# Now let's see the output:
-cat archsites_distance.csv
-Number,Distance,cat,str1
-1,446.958,24,"Hanson Ranch"
-2,1386.149,11,"No Name"
-3,2754.872,2,"No Name"
-4,4559.578,13,"No Name"
+# Now lets see the output:
+cat NC_96_geonames.csv
+Number,Distance,cat,GEONAMEID,NAME,ASCIINAME,ALTERNATEN,FEATURECLA,FEATURECOD,COUNTRYCOD,CC2,ADMIN1,POPULATION,ELEVATION,GTOPO30,TIMEZONE,MODIFICATI,PPLKEY,SRC_ID,MAINT_ID
+1,360.719,26881,4482019,"New Zebulon Elementary School","New Zebulon Elementary School","","S","SCH","US","","NC",0,106,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
+2,846.806,22026,4476596,"Little River, Township of","Little River, Township of","","A","ADMD","US","","NC",0,0,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
+3,2027.918,16681,4470608,"Hendricks Pond","Hendricks Pond","","H","RSV","US","","NC",0,0,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
+4,2027.918,16690,4470622,"Hendricks Dam","Hendricks Dam","","S","DAM","US","","NC",0,0,91,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
+5,2999.214,39338,4496159,"Union Chapel","Union Chapel","","","","US","","NC",0,0,96,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
+6,3784.992,43034,4500325,"Zebulon Airport","Zebulon Airport","","S","AIRP","US","","NC",0,108,98,"America/Iqaluit","2006-01-15 00:00:00",0,0,0
 </pre></div>
 
 <p>
-Create river valley crossection and provide river marker:
+Create river valley crossection and provide river marker (Spearfish dataset):
 
 <div class="code"><pre>
 # Take elevation samples
@@ -54,7 +55,7 @@
   profile=600570.27364,4920613.41838,600348.034348,4920840.38617
 
 # Now get distance to place where river marker should be set
-v.profile input=streams at PERMANENT output=river_profile.csv \
+v.profile input=streams at PERMANENT output=/home/user/river_profile.csv \
   east_north=600570.27364,4920613.41838,600348.034348,4920840.38617
 </pre></div>
 
@@ -73,7 +74,8 @@
 <h2>SEE ALSO</h2>
 
 <em>
-<a href="r.profile.html">r.profile</a>
+<a href="r.profile.html">r.profile</a><br>
+<a href="lrs.html">Linear Referencing System</a>
 </em>
 
 <h2>AUTHOR</h2>



More information about the grass-commit mailing list