[GRASS-SVN] r72023 - grass/branches/releasebranch_7_2/vector/v.info

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 2 13:53:34 PST 2018


Author: neteler
Date: 2018-01-02 13:53:34 -0800 (Tue, 02 Jan 2018)
New Revision: 72023

Added:
   grass/branches/releasebranch_7_2/vector/v.info/testsuite/
Modified:
   grass/branches/releasebranch_7_2/vector/v.info/local_proto.h
   grass/branches/releasebranch_7_2/vector/v.info/main.c
   grass/branches/releasebranch_7_2/vector/v.info/print.c
Log:
v.info: Added layer specific database information to extended metadata flag (trunk, r69535)

Modified: grass/branches/releasebranch_7_2/vector/v.info/local_proto.h
===================================================================
--- grass/branches/releasebranch_7_2/vector/v.info/local_proto.h	2018-01-02 21:48:01 UTC (rev 72022)
+++ grass/branches/releasebranch_7_2/vector/v.info/local_proto.h	2018-01-02 21:53:34 UTC (rev 72023)
@@ -10,8 +10,8 @@
 
 /* parse.c */
 void parse_args(int, char**,
-		char **, char**,
-		int *, int *, int *);
+                char **, char**,
+                int *, int *, int *);
 
 /* print.c */
 void format_double(double, char *);
@@ -19,4 +19,4 @@
 void print_topo(const struct Map_info *);
 void print_columns(const struct Map_info *, const char *, const char *);
 void print_info(const struct Map_info *);
-void print_shell(const struct Map_info *);
+void print_shell(const struct Map_info *, const char *);

Modified: grass/branches/releasebranch_7_2/vector/v.info/main.c
===================================================================
--- grass/branches/releasebranch_7_2/vector/v.info/main.c	2018-01-02 21:48:01 UTC (rev 72022)
+++ grass/branches/releasebranch_7_2/vector/v.info/main.c	2018-01-02 21:53:34 UTC (rev 72023)
@@ -83,7 +83,7 @@
     }
     
     if (shell_flag & SHELL_BASIC) {
-	print_shell(&Map);
+	print_shell(&Map, field_opt);
     }
     if (shell_flag & SHELL_REGION) {
 	print_region(&Map);

Modified: grass/branches/releasebranch_7_2/vector/v.info/print.c
===================================================================
--- grass/branches/releasebranch_7_2/vector/v.info/print.c	2018-01-02 21:48:01 UTC (rev 72022)
+++ grass/branches/releasebranch_7_2/vector/v.info/print.c	2018-01-02 21:53:34 UTC (rev 72023)
@@ -165,12 +165,12 @@
     db_shutdown_driver(driver);
 }
 
-void print_shell(const struct Map_info *Map)
+void print_shell(const struct Map_info *Map, const char *field_opt)
 {
     int map_type;
     int time_ok, first_time_ok, second_time_ok;
     char timebuff[256];
-    
+    struct field_info *fi;
     struct TimeStamp ts;
         
     time_ok = first_time_ok = second_time_ok = FALSE;
@@ -263,6 +263,18 @@
     if (Vect_level(Map) > 0) {
         fprintf(stdout, "num_dblinks=%d\n",
                 Vect_get_num_dblinks(Map));
+
+        if (Vect_get_num_dblinks(Map) > 0) {
+            fi = Vect_get_field2(Map, field_opt);
+            if(fi != NULL) {
+                fprintf(stdout, "attribute_layer_number=%i\n",fi->number);
+                fprintf(stdout, "attribute_layer_name=%s\n",fi->name);
+                fprintf(stdout, "attribute_database=%s\n",fi->database);
+                fprintf(stdout, "attribute_database_driver=%s\n",fi->driver);
+                fprintf(stdout, "attribute_table=%s\n",fi->table);
+                fprintf(stdout, "attribute_primary_key=%s\n",fi->key);
+            }
+        }
     }
 
     fprintf(stdout, "projection=%s\n",



More information about the grass-commit mailing list