[GRASS-SVN] r33247 - grass/branches/develbranch_6/vector/v.what
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 4 09:51:59 EDT 2008
Author: martinl
Date: 2008-09-04 09:51:59 -0400 (Thu, 04 Sep 2008)
New Revision: 33247
Modified:
grass/branches/develbranch_6/vector/v.what/what.c
Log:
v.what: use same key ('type') for all features
redundant spaces removed
Modified: grass/branches/develbranch_6/vector/v.what/what.c
===================================================================
--- grass/branches/develbranch_6/vector/v.what/what.c 2008-09-04 13:13:48 UTC (rev 33246)
+++ grass/branches/develbranch_6/vector/v.what/what.c 2008-09-04 13:51:59 UTC (rev 33247)
@@ -55,7 +55,7 @@
getz = Vect_tin_get_z(&Map[i], east, north, &z, NULL, NULL);
}
- G_debug(2, "line = %d \narea = %d", line, area);
+ G_debug(2, "line = %d area = %d", line, area);
if (!i) {
G_format_easting(east, east_buf, G_projection());
@@ -96,7 +96,6 @@
}
if (line > 0) {
- sprintf(buf, "Object type: ");
type = Vect_read_line(&Map[i], Points, Cats, line);
switch (type) {
case GV_POINT:
@@ -130,10 +129,10 @@
float angle;
Vect_get_line_areas(&(Map[i]), line, &left, &right);
- fprintf(stdout, "Looking for features within: %f \n",
+ fprintf(stdout, "Looking for features within: %f\n",
maxdist);
fprintf(stdout,
- _("Id: %d \nType: %s \nLeft: %d \nRight: %d \n"),
+ _("Id: %d\nType: %s\nLeft: %d\nRight: %d\n"),
line, buf, left, right);
if (type & GV_LINES) {
nnodes = 2;
@@ -153,7 +152,7 @@
Vect_get_node_coor(&(Map[i]), node[n], &nx, &ny, &nz);
fprintf(stdout,
- _("Node[%d]: %d \nNumber of lines: %d \nCoordinates: %.6f, %.6f, %.6f\n"),
+ _("Node[%d]: %d\nNumber of lines: %d\nCoordinates: %.6f, %.6f, %.6f\n"),
n, node[n], nnlines, nx, ny, nz);
for (nli = 0; nli < nnlines; nli++) {
@@ -161,7 +160,7 @@
Vect_get_node_line(&(Map[i]), node[n], nli);
angle =
Vect_get_node_line_angle(&(Map[i]), node[n], nli);
- fprintf(stdout, _("Id: %5d \nAngle: %.8f\n"),
+ fprintf(stdout, _("Id: %5d\nAngle: %.8f\n"),
nodeline, angle);
}
}
@@ -195,7 +194,7 @@
}
else {
fprintf(stdout,
- _("Line height min: %f \nLine height max: %f\n"),
+ _("Line height min: %f\nLine height max: %f\n"),
min, max);
}
}
@@ -204,18 +203,18 @@
if (area > 0) {
if (Map[i].head.with_z && getz) {
- fprintf(stdout, _("Object type: Area \nArea height: %f\n"),
+ fprintf(stdout, _("Type: Area\nArea height: %f\n"),
z);
}
else {
- fprintf(stdout, _("Object type: Area\n"));
+ fprintf(stdout, _("Type: Area\n"));
}
sq_meters = Vect_get_area_area(&Map[i], area);
if (topo) {
int nisles, isleidx, isle, isle_area;
nisles = Vect_get_area_num_isles(&Map[i], area);
- fprintf(stdout, _("Area: %d \nNumber of isles: %d\n"), area,
+ fprintf(stdout, _("Area: %d\nNumber of isles: %d\n"), area,
nisles);
for (isleidx = 0; isleidx < nisles; isleidx++) {
@@ -232,17 +231,17 @@
}
}
else {
- fprintf(stdout, _("Sq Meters: %.3f \nHectares: %.3f\n"),
+ fprintf(stdout, _("Sq Meters: %.3f\nHectares: %.3f\n"),
sq_meters, (sq_meters / 10000.));
- fprintf(stdout, _("Acres: %.3f \nSq Miles: %.4f\n"),
+ fprintf(stdout, _("Acres: %.3f\nSq Miles: %.4f\n"),
((sq_meters * 10.763649) / 43560.),
((sq_meters * 10.763649) / 43560.) / 640.);
if (notty) {
fprintf(stderr,
- _("Sq Meters: %.3f \nHectares: %.3f\n"),
+ _("Sq Meters: %.3f\nHectares: %.3f\n"),
sq_meters, (sq_meters / 10000.));
fprintf(stderr,
- _("Acres: %.3f \nSq Miles: %.4f\n"),
+ _("Acres: %.3f\nSq Miles: %.4f\n"),
((sq_meters * 10.763649) / 43560.),
((sq_meters * 10.763649) / 43560.) / 640.);
}
@@ -258,9 +257,9 @@
int j;
for (j = 0; j < Cats->n_cats; j++) {
- G_debug(2, "field = %d \ncategory = %d\n", Cats->field[j],
+ G_debug(2, "field = %d category = %d\n", Cats->field[j],
Cats->cat[j]);
- fprintf(stdout, _("Layer: %d\nCategory: %d \n"),
+ fprintf(stdout, _("Layer: %d\nCategory: %d\n"),
Cats->field[j], Cats->cat[j]);
Fi = Vect_get_field(&(Map[i]), Cats->field[j]);
if (Fi != NULL && showextra) {
More information about the grass-commit
mailing list