[GRASS-SVN] r39041 - grass/trunk/vector/v.out.ogr
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 6 06:57:03 EDT 2009
Author: martinl
Date: 2009-09-06 06:57:02 -0400 (Sun, 06 Sep 2009)
New Revision: 39041
Modified:
grass/trunk/vector/v.out.ogr/main.c
Log:
* use GRASS indentation style (see tools/grass_indent.sh)
* nothing to export is not an error
Modified: grass/trunk/vector/v.out.ogr/main.c
===================================================================
--- grass/trunk/vector/v.out.ogr/main.c 2009-09-06 07:00:59 UTC (rev 39040)
+++ grass/trunk/vector/v.out.ogr/main.c 2009-09-06 10:57:02 UTC (rev 39041)
@@ -271,7 +271,7 @@
i++;
}
- if ( update_flag->answer ) {
+ if (update_flag->answer) {
G_debug(1, "Update OGR data source");
Ogr_ds = OGR_Dr_Open(Ogr_driver, dsn_opt->answer, TRUE);
} else {
@@ -406,7 +406,7 @@
OGR_Fld_Destroy(Ogr_field);
} else {
/* skip export of 'cat' field */
- if ( strcmp (Fi->key,db_get_column_name(Column)) != 0 ) {
+ if (strcmp (Fi->key,db_get_column_name(Column)) != 0) {
Ogr_field =
OGR_Fld_Create(db_get_column_name(Column), ogr_ftype);
OGR_L_CreateField(Ogr_layer, Ogr_field, 0);
@@ -466,7 +466,7 @@
G_warning(_("No points found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_POINT )
+ if (otype & GV_POINT)
num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_POINT);
}
@@ -474,7 +474,7 @@
G_warning(_("No lines found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_LINE )
+ if (otype & GV_LINE)
num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_LINE);
}
@@ -482,7 +482,7 @@
G_warning(_("No boundaries found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_BOUNDARY )
+ if (otype & GV_BOUNDARY)
num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_BOUNDARY);
}
@@ -490,7 +490,7 @@
G_warning(_("No areas found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_AREA )
+ if (otype & GV_AREA)
num_to_export = num_to_export + Vect_get_num_areas(&In);
}
@@ -498,7 +498,7 @@
G_warning(_("No centroids found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_CENTROID )
+ if (otype & GV_CENTROID)
num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_CENTROID);
}
@@ -506,7 +506,7 @@
G_warning(_("No faces found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_FACE )
+ if (otype & GV_FACE)
num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_FACE);
}
@@ -514,7 +514,7 @@
G_warning(_("No kernels found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_KERNEL )
+ if (otype & GV_KERNEL)
num_to_export = num_to_export + Vect_get_num_primitives(&In, GV_KERNEL);
}
@@ -522,14 +522,15 @@
G_warning(_("No volumes found, but requested to be exported. "
"Will skip this geometry type."));
} else {
- if ( otype & GV_VOLUME )
+ if (otype & GV_VOLUME)
num_to_export = num_to_export + Vect_get_num_volumes(&In);
}
G_debug(1, "Requested to export %d geometries", num_to_export);
- if ( num_to_export < 1 ) {
- G_fatal_error(_("Nothing to export. Aborting."));
+ if (num_to_export < 1) {
+ G_warning(_("Nothing to export"));
+ exit(EXIT_SUCCESS);
}
/* Lines (run always to count features of different type) */
@@ -838,8 +839,8 @@
* all boundaries/centroids.
* OTOH why should be reported? */
/*
- if ( ((otype & GV_POINTS) || (otype & GV_LINES)) && fskip > 0 )
- G_warning ( "%d features of different type skip", fskip);
+ if (((otype & GV_POINTS) || (otype & GV_LINES)) && fskip > 0)
+ G_warning ("%d features of different type skip", fskip);
*/
exit(EXIT_SUCCESS);
@@ -941,7 +942,7 @@
}
}
}
- db_close_cursor ( &cursor );
+ db_close_cursor (&cursor);
}
}
@@ -951,7 +952,7 @@
}
}
else {
- /* G_warning ( "Line without cat of layer %d", field); */
+ /* G_warning ("Line without cat of layer %d", field); */
nocat++;
}
fout++;
More information about the grass-commit
mailing list