[GRASS-SVN] r50524 - grass/trunk/vector/v.info
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 28 07:35:43 EST 2012
Author: martinl
Date: 2012-01-28 04:35:43 -0800 (Sat, 28 Jan 2012)
New Revision: 50524
Modified:
grass/trunk/vector/v.info/print.c
Log:
v.info: show name and mapset also for non-native formats
Modified: grass/trunk/vector/v.info/print.c
===================================================================
--- grass/trunk/vector/v.info/print.c 2012-01-28 12:30:37 UTC (rev 50523)
+++ grass/trunk/vector/v.info/print.c 2012-01-28 12:35:43 UTC (rev 50524)
@@ -170,21 +170,11 @@
int map_type;
map_type = Vect_maptype(Map);
-
- if (map_type == GV_FORMAT_OGR ||
- map_type == GV_FORMAT_OGR_DIRECT) {
- fprintf(stdout, "ogr_layer=%s\n",
- Vect_get_ogr_layer_name(Map));
- fprintf(stdout, "ogr_dsn=%s\n",
- Vect_get_ogr_dsn_name(Map));
- }
- else {
- fprintf(stdout, "name=%s\n",
- Vect_get_name(Map));
- fprintf(stdout, "mapset=%s\n",
- Vect_get_mapset(Map));
- }
-
+
+ fprintf(stdout, "name=%s\n",
+ Vect_get_name(Map));
+ fprintf(stdout, "mapset=%s\n",
+ Vect_get_mapset(Map));
fprintf(stdout, "location=%s\n",
G_location());
fprintf(stdout, "database=%s\n",
@@ -198,6 +188,10 @@
map_type == GV_FORMAT_OGR_DIRECT) {
fprintf(stdout, "format=%s,%s\n",
Vect_maptype_info(Map), Vect_get_ogr_format_info(Map));
+ fprintf(stdout, "ogr_layer=%s\n",
+ Vect_get_ogr_layer_name(Map));
+ fprintf(stdout, "ogr_dsn=%s\n",
+ Vect_get_ogr_dsn_name(Map));
}
else {
fprintf(stdout, "format=%s\n",
@@ -255,24 +249,12 @@
}
divider('+');
- if (map_type == GV_FORMAT_OGR ||
- map_type == GV_FORMAT_OGR_DIRECT) {
- /* for OGR format print also datasource and layer */
- sprintf(line, "%-17s%s", _("OGR layer:"),
- Vect_get_ogr_layer_name(Map));
- printline(line);
- sprintf(line, "%-17s%s", _("OGR datasource:"),
- Vect_get_ogr_dsn_name(Map));
- printline(line);
- }
- else {
- sprintf(line, "%-17s%s", _("Name:"),
- Vect_get_name(Map));
- printline(line);
- sprintf(line, "%-17s%s", _("Mapset:"),
- Vect_get_mapset(Map));
- printline(line);
- }
+ sprintf(line, "%-17s%s", _("Name:"),
+ Vect_get_name(Map));
+ printline(line);
+ sprintf(line, "%-17s%s", _("Mapset:"),
+ Vect_get_mapset(Map));
+ printline(line);
sprintf(line, "%-17s%s", _("Location:"),
G_location());
@@ -280,6 +262,7 @@
sprintf(line, "%-17s%s", _("Database:"),
G_gisdbase());
printline(line);
+
sprintf(line, "%-17s%s", _("Title:"),
Vect_get_map_name(Map));
printline(line);
@@ -291,13 +274,22 @@
map_type == GV_FORMAT_OGR_DIRECT) {
sprintf(line, "%-17s%s (%s)", _("Map format:"),
Vect_maptype_info(Map), Vect_get_ogr_format_info(Map));
+ printline(line);
+
+ /* for OGR format print also datasource and layer */
+ sprintf(line, "%-17s%s", _("OGR layer:"),
+ Vect_get_ogr_layer_name(Map));
+ printline(line);
+ sprintf(line, "%-17s%s", _("OGR datasource:"),
+ Vect_get_ogr_dsn_name(Map));
+ printline(line);
}
else {
sprintf(line, "%-17s%s", _("Map format:"),
Vect_maptype_info(Map));
+ printline(line);
}
-
- printline(line);
+
sprintf(line, "%-17s%s", _("Name of creator:"),
Vect_get_person(Map));
printline(line);
More information about the grass-commit
mailing list