瀏覽代碼

reversed -c flag, manual updated

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36726 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 16 年之前
父節點
當前提交
a193485d9b
共有 2 個文件被更改,包括 13 次插入12 次删除
  1. 8 7
      vector/v.out.ogr/main.c
  2. 5 5
      vector/v.out.ogr/v.out.ogr.html

+ 8 - 7
vector/v.out.ogr/main.c

@@ -148,8 +148,8 @@ int main(int argc, char *argv[])
 
 
     cat_flag = G_define_flag();
     cat_flag = G_define_flag();
     cat_flag->key = 'c';
     cat_flag->key = 'c';
-    cat_flag->description = _("Export features with category (labeled) only. "
-			      "Otherwise all features are exported");
+    cat_flag->description = _("Also export features without category (not labeled). "
+			      "Otherwise only features with category are exported");
 
 
     esristyle = G_define_flag();
     esristyle = G_define_flag();
     esristyle->key = 'e';
     esristyle->key = 'e';
@@ -198,9 +198,9 @@ int main(int argc, char *argv[])
 
 
 
 
     if (cat_flag->answer)
     if (cat_flag->answer)
-	donocat = 0;
-    else
 	donocat = 1;
 	donocat = 1;
+    else
+	donocat = 0;
 
 
     Points = Vect_new_line_struct();
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
     Cats = Vect_new_cats_struct();
@@ -209,8 +209,9 @@ int main(int argc, char *argv[])
     Vect_set_open_level(2);
     Vect_set_open_level(2);
     Vect_open_old(&In, in_opt->answer, "");
     Vect_open_old(&In, in_opt->answer, "");
 
 
-    if (Vect_get_num_islands(&In) > 0 && !cat_flag->answer)
-	G_warning(_("The map contains islands. To preserve them in the output map, use the -c flag"));
+    if ((GV_AREA & otype) && Vect_get_num_islands(&In) > 0 && cat_flag->answer)
+	G_warning(_("The map contains islands. With the -c flag, "
+	            "islands will appear as filled areas, not holes in the output map."));
 
 
     /* fetch PROJ info */
     /* fetch PROJ info */
     G_get_default_window(&cellhd);
     G_get_default_window(&cellhd);
@@ -642,7 +643,7 @@ int main(int argc, char *argv[])
     if (noatt > 0)
     if (noatt > 0)
 	G_warning(_("%d features without attributes were written"), noatt);
 	G_warning(_("%d features without attributes were written"), noatt);
     if (nocatskip > 0)
     if (nocatskip > 0)
-	G_warning(_("%d features found without category were skipped"),
+	G_message(_("%d features found without category were skipped"),
 		nocatskip);
 		nocatskip);
 
 
     /* Enable this? May be confusing that for area type are not reported
     /* Enable this? May be confusing that for area type are not reported

+ 5 - 5
vector/v.out.ogr/v.out.ogr.html

@@ -23,9 +23,9 @@ For further available drivers go
 
 
 <h2>NOTES</h2>
 <h2>NOTES</h2>
 
 
-To export areas with holes into, e.g., a Shapefile, while keeping the 
-holes as holes, the flag <em>-c</em> has to be used.
-
+By default, islands will appear as holes inside surrounding areas.
+To export areas with holes into, e.g., a Shapefile, and make the 
+holes appear as filled areas, the flag <em>-c</em> has to be used.
 
 
 <h2>EXAMPLES</h2>
 <h2>EXAMPLES</h2>
 
 
@@ -37,8 +37,8 @@ Export lines from GRASS vector map to Shapefile format
 v.out.ogr input=multi type=line dsn=/tmp olayer=testogr 
 v.out.ogr input=multi type=line dsn=/tmp olayer=testogr 
 </pre></div>
 </pre></div>
 
 
-Export areas from GRASS vector map to Shapefile format, preserving islands
- (generates /tmp/testogr.shp and related files):
+Export areas from GRASS vector map to Shapefile format, converting
+islands (holes) to filled areas (generates /tmp/testogr.shp and related files):
 <div class="code"><pre>
 <div class="code"><pre>
 v.out.ogr -c input=multi type=area dsn=/tmp olayer=testogr 
 v.out.ogr -c input=multi type=area dsn=/tmp olayer=testogr 
 </pre></div>
 </pre></div>