Procházet zdrojové kódy

v.out.ogr: wording & cosmetics

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@39460 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa před 15 roky
rodič
revize
6d8496a26c
1 změnil soubory, kde provedl 16 přidání a 14 odebrání
  1. 16 14
      vector/v.out.ogr/main.c

+ 16 - 14
vector/v.out.ogr/main.c

@@ -541,7 +541,7 @@ int main(int argc, char *argv[])
     num_to_export = 0;
     num_to_export = 0;
     if (Vect_get_num_primitives(&In, GV_POINT) < 1 && (otype & GV_POINTS)) {
     if (Vect_get_num_primitives(&In, GV_POINT) < 1 && (otype & GV_POINTS)) {
         G_warning(_("No points found, but requested to be exported. "
         G_warning(_("No points found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_POINT)
         if (otype & GV_POINT)
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_POINT);
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_POINT);
@@ -549,7 +549,7 @@ int main(int argc, char *argv[])
 
 
     if (Vect_get_num_primitives(&In, GV_LINE) < 1 && (otype & GV_LINE)) {
     if (Vect_get_num_primitives(&In, GV_LINE) < 1 && (otype & GV_LINE)) {
         G_warning(_("No lines found, but requested to be exported. "
         G_warning(_("No lines found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_LINE)
         if (otype & GV_LINE)
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_LINE);
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_LINE);
@@ -557,7 +557,7 @@ int main(int argc, char *argv[])
 
 
     if (Vect_get_num_primitives(&In, GV_BOUNDARY) < 1 && (otype & GV_BOUNDARY)) {
     if (Vect_get_num_primitives(&In, GV_BOUNDARY) < 1 && (otype & GV_BOUNDARY)) {
         G_warning(_("No boundaries found, but requested to be exported. "
         G_warning(_("No boundaries found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_BOUNDARY)
         if (otype & GV_BOUNDARY)
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_BOUNDARY);
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_BOUNDARY);
@@ -565,7 +565,7 @@ int main(int argc, char *argv[])
 
 
     if (Vect_get_num_areas(&In) < 1 && (otype & GV_AREA)) {
     if (Vect_get_num_areas(&In) < 1 && (otype & GV_AREA)) {
         G_warning(_("No areas found, but requested to be exported. "
         G_warning(_("No areas found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_AREA)
         if (otype & GV_AREA)
             num_to_export = num_to_export + Vect_get_num_areas(&In);
             num_to_export = num_to_export + Vect_get_num_areas(&In);
@@ -573,7 +573,7 @@ int main(int argc, char *argv[])
 
 
     if (Vect_get_num_primitives(&In, GV_CENTROID) < 1 && (otype & GV_CENTROID)) {
     if (Vect_get_num_primitives(&In, GV_CENTROID) < 1 && (otype & GV_CENTROID)) {
         G_warning(_("No centroids found, but requested to be exported. "
         G_warning(_("No centroids found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_CENTROID)
         if (otype & GV_CENTROID)
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_CENTROID);
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_CENTROID);
@@ -581,7 +581,7 @@ int main(int argc, char *argv[])
 
 
     if (Vect_get_num_primitives(&In, GV_FACE) < 1 && (otype & GV_FACE)) {
     if (Vect_get_num_primitives(&In, GV_FACE) < 1 && (otype & GV_FACE)) {
         G_warning(_("No faces found, but requested to be exported. "
         G_warning(_("No faces found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_FACE)
         if (otype & GV_FACE)
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_FACE);
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_FACE);
@@ -589,7 +589,7 @@ int main(int argc, char *argv[])
 
 
     if (Vect_get_num_primitives(&In, GV_KERNEL) < 1 && (otype & GV_KERNEL)) {
     if (Vect_get_num_primitives(&In, GV_KERNEL) < 1 && (otype & GV_KERNEL)) {
         G_warning(_("No kernels found, but requested to be exported. "
         G_warning(_("No kernels found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_KERNEL)
         if (otype & GV_KERNEL)
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_KERNEL);
             num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_KERNEL);
@@ -597,13 +597,13 @@ int main(int argc, char *argv[])
 
 
     if (Vect_get_num_volumes(&In) < 1 && (otype & GV_VOLUME)) {
     if (Vect_get_num_volumes(&In) < 1 && (otype & GV_VOLUME)) {
         G_warning(_("No volumes found, but requested to be exported. "
         G_warning(_("No volumes found, but requested to be exported. "
-		    "Will skip this geometry type."));
+		    "Will skip this feature type."));
     } else {
     } else {
         if (otype & GV_VOLUME)
         if (otype & GV_VOLUME)
             num_to_export = num_to_export + Vect_get_num_volumes(&In);
             num_to_export = num_to_export + Vect_get_num_volumes(&In);
     }
     }
 
 
-    G_debug(1, "Requested to export %d geometries", num_to_export);
+    G_debug(1, "Requested to export %d features", num_to_export);
 
 
     if (num_to_export < 1) {
     if (num_to_export < 1) {
         G_warning(_("Nothing to export"));
         G_warning(_("Nothing to export"));
@@ -612,7 +612,7 @@ int main(int argc, char *argv[])
 
 
     /* Lines (run always to count features of different type) */
     /* Lines (run always to count features of different type) */
     if ((otype & GV_POINTS) || (otype & GV_LINES)) {
     if ((otype & GV_POINTS) || (otype & GV_LINES)) {
-	G_message(_("Exporting %i geometries..."), Vect_get_num_lines(&In));
+	G_message(_("Exporting %i features..."), Vect_get_num_lines(&In));
 	for (i = 1; i <= Vect_get_num_lines(&In); i++) {
 	for (i = 1; i <= Vect_get_num_lines(&In); i++) {
 
 
 	    G_percent(i, Vect_get_num_lines(&In), 1);
 	    G_percent(i, Vect_get_num_lines(&In), 1);
@@ -692,7 +692,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     /* Areas (run always to count features of different type) */
     /* Areas (run always to count features of different type) */
-    if (otype & GV_AREA) {
+    if (Vect_get_num_primitives(&In, GV_AREA) > 0 && otype & GV_AREA) {
 	G_message(_("Exporting %i areas (may take some time)..."),
 	G_message(_("Exporting %i areas (may take some time)..."),
 		  Vect_get_num_areas(&In));
 		  Vect_get_num_areas(&In));
 	for (i = 1; i <= Vect_get_num_areas(&In); i++) {
 	for (i = 1; i <= Vect_get_num_areas(&In); i++) {
@@ -766,8 +766,8 @@ int main(int argc, char *argv[])
     }
     }
 
 
     /* Faces (run always to count features of different type)  - Faces are similar to lines */
     /* Faces (run always to count features of different type)  - Faces are similar to lines */
-    if (otype & GV_FACE) {
-	G_message(_("Exporting %i faces (may take some time) ..."),
+    if (Vect_get_num_primitives(&In, GV_FACE) > 0 && otype & GV_FACE) {
+	G_message(_("Exporting %i faces..."),
 		  Vect_get_num_faces(&In));
 		  Vect_get_num_faces(&In));
 	for (i = 1; i <= Vect_get_num_faces(&In); i++) {
 	for (i = 1; i <= Vect_get_num_faces(&In); i++) {
 	    OGRGeometryH ring;
 	    OGRGeometryH ring;
@@ -829,7 +829,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     /* Kernels */
     /* Kernels */
-    if (otype & GV_KERNEL) {
+    if (Vect_get_num_primitives(&In, GV_KERNEL) > 0 && otype & GV_KERNEL) {
 	G_message(_("Exporting %i kernels..."), Vect_get_num_kernels(&In));
 	G_message(_("Exporting %i kernels..."), Vect_get_num_kernels(&In));
 	for (i = 1; i <= Vect_get_num_lines(&In); i++) {
 	for (i = 1; i <= Vect_get_num_lines(&In); i++) {
 
 
@@ -920,6 +920,8 @@ int main(int argc, char *argv[])
        G_warning ("%d features of different type skip", fskip);
        G_warning ("%d features of different type skip", fskip);
      */
      */
 
 
+    G_done_msg(" ");
+    
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);
 }
 }