[GRASS-SVN] r45050 - in grass/trunk: lib/gis lib/python
vector/v.info
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 15 18:55:14 EST 2011
Author: martinl
Date: 2011-01-15 15:55:13 -0800 (Sat, 15 Jan 2011)
New Revision: 45050
Modified:
grass/trunk/lib/gis/parser_standard_options.c
grass/trunk/lib/python/pythonlib.dox
grass/trunk/lib/python/vector.py
grass/trunk/vector/v.info/local_proto.h
grass/trunk/vector/v.info/main.c
grass/trunk/vector/v.info/parse.c
grass/trunk/vector/v.info/print.c
grass/trunk/vector/v.info/v.info.html
Log:
v.info: -r/-m/-t -> shell param (basic,region,topo) + manual updated
pythonlib updated
gislib: cosmetics in standard options
Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/lib/gis/parser_standard_options.c 2011-01-15 23:55:13 UTC (rev 45050)
@@ -289,7 +289,7 @@
Opt->key_desc = "name";
Opt->required = YES;
Opt->gisprompt = "old,grid3,3d-raster";
- Opt->description = _("Name of input 3D raster map");
+ Opt->description = _("Name of 3D raster map");
break;
case G_OPT_R3_MAPS:
Opt->key = "map";
@@ -298,7 +298,7 @@
Opt->required = YES;
Opt->multiple = YES;
Opt->gisprompt = "old,grid3,3d-raster";
- Opt->description = _("Name of input 3D raster map(s)");
+ Opt->description = _("Name of 3D raster map(s)");
break;
/*vector maps */
@@ -309,7 +309,7 @@
Opt->required = YES;
Opt->gisprompt = "old,vector,vector";
Opt->label = _("Name of input vector map");
- Opt->description = _("Data source for OGR access");
+ Opt->description = _("Data source for direct OGR access");
break;
case G_OPT_V_INPUTS:
Opt->key = "input";
@@ -319,7 +319,7 @@
Opt->multiple = YES;
Opt->gisprompt = "old,vector,vector";
Opt->label = _("Name of input vector map(s)");
- Opt->description = _("Data source(s) for OGR access");
+ Opt->description = _("Data source(s) for direct OGR access");
break;
case G_OPT_V_OUTPUT:
Opt->key = "output";
@@ -335,8 +335,8 @@
Opt->key_desc = "name";
Opt->required = YES;
Opt->gisprompt = "old,vector,vector";
- Opt->label = _("Name of input vector map");
- Opt->description = _("Data source for OGR access");
+ Opt->label = _("Name of vector map");
+ Opt->description = _("Data source for direct OGR access");
break;
case G_OPT_V_MAPS:
Opt->key = "map";
@@ -345,7 +345,7 @@
Opt->required = YES;
Opt->multiple = YES;
Opt->gisprompt = "old,vector,vector";
- Opt->description = _("Name of input vector map(s)");
+ Opt->description = _("Name of vector map(s)");
break;
case G_OPT_V_TYPE:
Opt->key = "type";
@@ -374,7 +374,7 @@
Opt->description =
_("A single vector map can be connected to multiple database "
"tables. This number determines which table to use. "
- "Layer name for OGR access.");
+ "Layer name for direct OGR access.");
Opt->gisprompt = "old,layer,layer";
break;
case G_OPT_V_FIELD_ALL:
@@ -386,7 +386,7 @@
Opt->description =
_("A single vector map can be connected to multiple database "
"tables. This number determines which table to use. "
- "Layer name for OGR access.");
+ "Layer name for direct OGR access.");
Opt->gisprompt = "old,layer,layer_all";
break;
case G_OPT_V_CAT:
Modified: grass/trunk/lib/python/pythonlib.dox
===================================================================
--- grass/trunk/lib/python/pythonlib.dox 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/lib/python/pythonlib.dox 2011-01-15 23:55:13 UTC (rev 45050)
@@ -15,6 +15,7 @@
- db.py
- raster.py
- vector.py
+- setup.py
<b>Table of content</b>
@@ -24,6 +25,7 @@
- \subpage pythonDb
- \subpage pythonRaster
- \subpage pythonVector
+ - \subpage pythonSetup
\section pythonScripting GRASS scripting tasks for Python provided by "grass.script"
@@ -82,42 +84,42 @@
<b>GRASS-oriented interface to subprocess module</b>
- - exec_command()
+ - python::core::exec_command()
- - feed_command()
+ - python::core::feed_command()
- - make_command()
+ - python::core::make_command()
- - parse_command()
+ - python::core::parse_command()
- - pipe_command()
+ - python::core::pipe_command()
- - read_command()
+ - python::core::read_command()
- - run_command()
+ - python::core::run_command()
- - start_command()
+ - python::core::start_command()
- - write_command()
+ - python::core::write_command()
<b>Interface to g.message</b>
These all run g.message, differing only in which flag (if any) is
used. fatal() is error(), but also calls sys.exit(1).
- - debug()
+ - python::core::debug()
- - error()
+ - python::core::error()
- - fatal()
+ - python::core::fatal()
- - info()
+ - python::core::info()
- - message()
+ - python::core::message()
- - verbose()
+ - python::core::verbose()
- - warning()
+ - python::core::warning()
<b>Interface to g.parser</b>
@@ -129,118 +131,110 @@
main()
\endcode
- - parser()
+ - python::core::parser()
<b>Interface to g.tempfile</b>
Returns the name of a temporary file, created with g.tempfile.
- - tempfile()
+ - python::core::tempfile()
<b>Key-value parsers</b>
- - parse_key_val()
+ - python::core::parse_key_val()
<b>Interface to g.gisenv</b>
- - gisenv()
+ - python::core::gisenv()
<b>Interface to g.region</b>
- - del_temp_region()
+ - python::core::del_temp_region()
- - region()
+ - python::core::region()
- - use_temp_region()
+ - python::core::use_temp_region()
<b>Interface to g.findfile</b>
- - find_file()
+ - python::core::find_file()
<b>Interface to g.list</b>
- - list_grouped()
+ - python::core::list_grouped()
- - list_pairs()
+ - python::core::list_pairs()
- - list_strings()
+ - python::core::list_strings()
- - mlist_grouped()
+ - python::core::mlist_grouped()
<b>Interface to g.mapsets</b>
- - mapsets()
+ - python::core::mapsets()
<b>Color parsing</b>
- - parse_color()
+ - python::core::parse_color()
<b>Check GRASS environment variables</b>
- - overwrite()
+ - python::core::overwrite()
- - verbosity()
+ - python::core::verbosity()
<b>Various utilities, not specific to GRASS</b>
- - basename()
+ - python::core::basename()
- - find_program()
+ - python::core::find_program()
- - try_remove()
+ - python::core::try_remove()
- - try_rmdir()
+ - python::core::try_rmdir()
- - float_or_dms()
+ - python::core::float_or_dms()
\section pythonDb Database
Interface for <tt>db.*</tt> modules.
-\code
-from grass.script import db as grass
-\endcode
+ - python::db::db_connection()
- - db_connection()
+ - python::db::db_describe()
- - db_describe()
+ - python::db::db_select()
- - db_select()
-
\section pythonRaster Raster
Interface for <tt>r.*</tt> modules.
-\code
-from grass.script import raster as grass
-\endcode
+ - python::raster::raster_history()
- - raster_history()
+ - python::raster::raster_info()
- - raster_info()
+ - python::raster::mapcalc()
- - mapcalc()
-
\section pythonVector Vector
Interface for <tt>v.*</tt> modules.
-\code
-from grass.script import vector as grass
-\endcode
+ - python::vector::vector_columns()
- - vector_columns()
+ - python::vector::vector_db()
- - vector_db()
+ - python::vector::vector_db_select()
- - vector_db_select()
+ - python::vector::vector_history()
- - vector_history()
+ - python::vector::vector_info_topo()
- - vector_info_topo()
+ - python::vector::vector_layer_db()
- - vector_layer_db()
+\section pythonSetup Setup
+ - python::setup::init()
+
\section pythonAuthors Authors
Glynn Clements
Modified: grass/trunk/lib/python/vector.py
===================================================================
--- grass/trunk/lib/python/vector.py 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/lib/python/vector.py 2011-01-15 23:55:13 UTC (rev 45050)
@@ -143,7 +143,7 @@
"""
run_command('v.support', map = map, cmdhist = os.environ['CMDLINE'])
-# run "v.info -t" and parse output
+# run "v.info shell=topo" and parse output
def vector_info_topo(map):
"""!Return information about a vector map (interface to `v.info
@@ -153,15 +153,19 @@
>>> grass.vector_info_topo('lakes')
{'kernels': 0, 'lines': 0, 'centroids': 15279,
'boundaries': 27764, 'points': 0, 'faces': 0,
- 'primitives': 43043, 'islands': 7470, 'nodes': 35234, 'map3d': 0, 'areas': 15279}
+ 'primitives': 43043, 'islands': 7470, 'nodes': 35234, 'map3d': False, 'areas': 15279}
\endcode
@param map map name
@return parsed output
"""
- s = read_command('v.info', flags = 't', map = map)
- return parse_key_val(s, val_type = int)
+ s = read_command('v.info', map = map, shell = 'topo')
+ ret = parse_key_val(s, val_type = int)
+ if ret.has_key('map3d'):
+ ret['map3d'] = bool(ret['map3d'])
+
+ return ret
# interface for v.db.select
Modified: grass/trunk/vector/v.info/local_proto.h
===================================================================
--- grass/trunk/vector/v.info/local_proto.h 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/vector/v.info/local_proto.h 2011-01-15 23:55:13 UTC (rev 45050)
@@ -1,12 +1,17 @@
#include <grass/vector.h>
+#define NO_INFO 0x00
+#define BASIC_INFO 0x02
+#define REGION_INFO 0x04
+#define TOPO_INFO 0x08
+
/* level1.c */
int level_one_info(struct Map_info *);
/* parse.c */
void parse_args(int, char**,
char **, char**,
- int *, int *, int *, int *, int *);
+ int *, int *, int *);
/* print.c */
void format_double(double, char *);
@@ -14,3 +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 *);
Modified: grass/trunk/vector/v.info/main.c
===================================================================
--- grass/trunk/vector/v.info/main.c 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/vector/v.info/main.c 2011-01-15 23:55:13 UTC (rev 45050)
@@ -8,7 +8,7 @@
*
* PURPOSE: Print vector map info
*
- * COPYRIGHT: (C) 2002-2009 by the GRASS Development Team
+ * COPYRIGHT: (C) 2002-2009, 2011 by the GRASS Development Team
*
* This program is free software under the GNU General
* Public License (>=v2). Read the file COPYING that
@@ -28,7 +28,7 @@
struct GModule *module;
char *input_opt, *field_opt;
- int hist_flag, col_flag, reg_flag, topo_flag, title_flag;
+ int hist_flag, col_flag, shell_flag;
struct Map_info Map;
@@ -38,14 +38,16 @@
G_add_keyword(_("vector"));
G_add_keyword(_("metadata"));
G_add_keyword(_("history"));
+ G_add_keyword(_("attribute columns"));
+
module->description =
_("Outputs basic information about a vector map.");
- G_debug(1,"LFS is %s", sizeof(off_t) == 8 ? "available" : "not available");
+ G_debug(1, "LFS is %s", sizeof(off_t) == 8 ? "available" : "not available");
parse_args(argc, argv,
&input_opt, &field_opt,
- &hist_flag, &col_flag, ®_flag, &topo_flag, &title_flag);
+ &hist_flag, &col_flag, &shell_flag);
/* try to open head-only on level 2 */
if (Vect_open_old_head2(&Map, input_opt, "", field_opt) < 2) {
@@ -57,37 +59,39 @@
G_fatal_error(_("Unable to open vector map <%s>"), Vect_get_full_name(&Map));
/* level one info not needed for history, title, columns */
- if (!hist_flag && !title_flag && !col_flag)
+ if (!hist_flag && !col_flag)
level_one_info(&Map);
}
- if (hist_flag) {
- char buf[1001];
+ if (hist_flag || col_flag) {
+ if (hist_flag) {
+ char buf[1001];
+
+ Vect_hist_rewind(&Map);
+ while (Vect_hist_read(buf, 1000, &Map) != NULL) {
+ fprintf(stdout, "%s\n", buf);
+ }
+ }
+ else if (col_flag) {
+ print_columns(&Map, input_opt, field_opt);
+ }
+ Vect_close(&Map);
- Vect_hist_rewind(&Map);
- while (Vect_hist_read(buf, 1000, &Map) != NULL) {
- fprintf(stdout, "%s\n", buf);
- }
+ return (EXIT_SUCCESS);
}
- else if (title_flag) {
- fprintf(stdout, "%s\n", Vect_get_map_name(&Map));
+
+ if (shell_flag & BASIC_INFO) {
+ print_shell(&Map);
}
- else if (reg_flag || topo_flag) {
- if (reg_flag) {
- print_region(&Map);
- }
- if (topo_flag) {
- print_topo(&Map);
- }
+ if (shell_flag & REGION_INFO) {
+ print_region(&Map);
}
- else {
- if (col_flag) {
- print_columns(&Map, input_opt, field_opt);
- }
- else {
- print_info(&Map);
- }
+ if (shell_flag & TOPO_INFO) {
+ print_topo(&Map);
}
+ if (shell_flag == 0) {
+ print_info(&Map);
+ }
Vect_close(&Map);
Modified: grass/trunk/vector/v.info/parse.c
===================================================================
--- grass/trunk/vector/v.info/parse.c 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/vector/v.info/parse.c 2011-01-15 23:55:13 UTC (rev 45050)
@@ -5,50 +5,58 @@
void parse_args(int argc, char** argv,
char** input, char** field,
- int* history, int* columns, int* region, int* topo, int* title)
+ int* history, int* columns, int *shell)
{
- struct Option *input_opt, *field_opt;
- struct Flag *hist_flag, *col_flag, *region_flag, *topo_flag, *title_flag;
-
+ int i;
+ const char *answer;
+
+ struct Option *input_opt, *field_opt, *print_opt;
+ struct Flag *hist_flag, *col_flag;
+
input_opt = G_define_standard_option(G_OPT_V_MAP);
field_opt = G_define_standard_option(G_OPT_V_FIELD);
+ print_opt = G_define_option();
+ print_opt->key = "shell";
+ print_opt->multiple = YES;
+ print_opt->options = "basic,region,topo";
+ print_opt->label = _("Print info in shell script style");
+ print_opt->description = _("Ignored if -h or -c flags are given");
+ print_opt->descriptions = _("basic;basic info only;"
+ "region;map region;"
+ "topo;topology information");
+ print_opt->guisection = _("Print");
+
hist_flag = G_define_flag();
hist_flag->key = 'h';
- hist_flag->description = _("Print vector history instead of info");
+ hist_flag->description = _("Print history instead of info and exit");
hist_flag->guisection = _("Print");
col_flag = G_define_flag();
col_flag->key = 'c';
col_flag->description =
- _("Print types/names of table columns for specified layer instead of info");
+ _("Print types/names of table columns for specified layer instead of info and exit");
col_flag->guisection = _("Print");
- region_flag = G_define_flag();
- region_flag->key = 'g';
- region_flag->description = _("Print map region only");
- region_flag->guisection = _("Print");
-
- title_flag = G_define_flag();
- title_flag->key = 'm';
- title_flag->description = _("Print map title only");
- title_flag->guisection = _("Print");
-
- topo_flag = G_define_flag();
- topo_flag->key = 't';
- topo_flag->description = _("Print topology information only");
- topo_flag->guisection = _("Print");
-
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
*input = G_store(input_opt->answer);
*field = G_store(field_opt->answer);
-
- *history = hist_flag-> answer ? 1 : 0;
- *columns = col_flag-> answer ? 1 : 0;
- *region = region_flag-> answer ? 1 : 0;
- *title = title_flag-> answer ? 1 : 0;
- *topo = topo_flag-> answer ? 1 : 0;
+ *history = hist_flag->answer ? TRUE : FALSE;
+ *columns = col_flag->answer ? TRUE : FALSE;
+ i = 0;
+ *shell = NO_INFO;
+ if (print_opt->answer) {
+ while(print_opt->answers[i]) {
+ answer = print_opt->answers[i++];
+ if (strcmp(answer, "basic") == 0)
+ *shell |= BASIC_INFO;
+ else if (strcmp(answer, "region") == 0)
+ *shell |= REGION_INFO;
+ else if (strcmp(answer, "topo") == 0)
+ *shell |= TOPO_INFO;
+ }
+ }
}
Modified: grass/trunk/vector/v.info/print.c
===================================================================
--- grass/trunk/vector/v.info/print.c 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/vector/v.info/print.c 2011-01-15 23:55:13 UTC (rev 45050)
@@ -107,8 +107,9 @@
fprintf(stdout, "primitives=%ld\n", nprimitives);
fflush(stdout);
-
- fprintf(stdout, "map3d=%d\n", Vect_is_3d(Map));
+
+ fprintf(stdout, "map3d=%d\n",
+ Vect_is_3d(Map) ? 1 : 0);
fflush(stdout);
}
@@ -163,6 +164,65 @@
db_shutdown_driver(driver);
}
+void print_shell(const struct Map_info *Map)
+{
+ if (Vect_maptype(Map) & (GV_FORMAT_OGR | 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, "location=%s\n",
+ G_location());
+ fprintf(stdout, "database=%s\n",
+ G_gisdbase());
+ fprintf(stdout, "title=%s\n",
+ Vect_get_map_name(Map));
+ fprintf(stdout, "scale=1:%d\n",
+ Vect_get_scale(Map));
+
+ if (Vect_maptype(Map) & (GV_FORMAT_OGR | GV_FORMAT_OGR_DIRECT)) {
+ fprintf(stdout, "format=%s,%s\n",
+ Vect_maptype_info(Map), Vect_get_ogr_format_info(Map));
+ }
+ else {
+ fprintf(stdout, "format=%s\n",
+ Vect_maptype_info(Map));
+ }
+
+ fprintf(stdout, "creator=%s\n",
+ Vect_get_person(Map));
+ fprintf(stdout, "organization=%s\n",
+ Vect_get_organization(Map));
+ fprintf(stdout, "source_date=%s\n",
+ Vect_get_map_date(Map));
+ fprintf(stdout, "level=%d\n",
+ Vect_level(Map));
+
+ if (Vect_level(Map) > 0) {
+ fprintf(stdout, "num_dblinks=%d\n",
+ Vect_get_num_dblinks(Map));
+ }
+
+ fprintf(stdout, "projection=%s\n",
+ Vect_get_proj_name(Map));
+ if (G_projection() == PROJECTION_UTM) {
+ fprintf(stdout, "zone=%d\n",
+ Vect_get_zone(Map));
+ }
+ fprintf(stdout, "digitization_threshold=%f\n",
+ Vect_get_thresh(Map));
+ fprintf(stdout, "comment=%s\n",
+ Vect_get_comment(Map));
+}
+
void print_info(const struct Map_info *Map)
{
int i;
@@ -189,6 +249,7 @@
Vect_get_mapset(Map));
printline(line);
}
+
sprintf(line, "%-17s%s", _("Location:"),
G_location());
printline(line);
@@ -201,6 +262,7 @@
sprintf(line, "%-17s1:%d", _("Map scale:"),
Vect_get_scale(Map));
printline(line);
+
if (Vect_maptype(Map) & (GV_FORMAT_OGR | GV_FORMAT_OGR_DIRECT)) {
sprintf(line, "%-17s%s (%s)", _("Map format:"),
Vect_maptype_info(Map), Vect_get_ogr_format_info(Map));
@@ -209,6 +271,7 @@
sprintf(line, "%-17s%s", _("Map format:"),
Vect_maptype_info(Map));
}
+
printline(line);
sprintf(line, "%-17s%s", _("Name of creator:"),
Vect_get_person(Map));
@@ -267,6 +330,7 @@
printline(line);
}
printline("");
+
sprintf(line, " %-24s%s",
_("Map is 3D:"),
Vect_is_3d(Map) ? _("Yes") : _("No"));
@@ -289,10 +353,10 @@
sprintf(line, " %s: %s",
_("Projection"),
Vect_get_proj_name(Map));
-
+
printline(line);
printline("");
-
+
Vect_get_map_box(Map, &box);
G_format_northing(box.N, tmp1, G_projection());
@@ -315,7 +379,7 @@
printline(line);
}
printline("");
-
+
format_double(Vect_get_thresh(Map), tmp1);
sprintf(line, " %s: %s", _("Digitization threshold"), tmp1);
printline(line);
Modified: grass/trunk/vector/v.info/v.info.html
===================================================================
--- grass/trunk/vector/v.info/v.info.html 2011-01-15 01:41:04 UTC (rev 45049)
+++ grass/trunk/vector/v.info/v.info.html 2011-01-15 23:55:13 UTC (rev 45050)
@@ -4,13 +4,14 @@
user-specified vector map and its topology status.
<p>
-Vector map is opened without topology (i.e., on level 1) when
-the <b>-l</b> flag is used. With the <b>-l</b> flag set, vector map
-extends and number of features need to be counted on the fly which may
-take some time.
+If topology info is not available (i.e., vector map cannot be open on
+level 2), vector map extends and number of features need to be counted
+on the fly which may take some time.
<h2>EXAMPLE</h2>
+<h3>Basic info</h3>
+
<div class="code"><pre>
v.info map=geology
@@ -46,6 +47,105 @@
+----------------------------------------------------------------------------+
</pre></div>
+<h3>History</h3>
+
+<div class="code"><pre>
+v.info -h map=geology
+
+COMMAND: v.in.ogr dsn="geol.shp" output="geology" min_area=0.0001 snap=-1
+GISDBASE: /bigdata/grassdata05
+LOCATION: ncfromfile MAPSET: PERMANENT USER: helena DATE: Mon Nov 6 15:48:53 2006
+---------------------------------------------------------------------------------
+1832 input polygons
+total area: 1.276093e+11 (1832 areas)
+overlapping area: 0.000000e+00 (0 areas)
+area without category: 0.000000e+00 (0 areas)
+---------------------------------------------------------------------------------
+</pre></div>
+
+<h3>Attribute columns for given layer</h3>
+
+<div class="code"><pre>
+v.info -c map=geology
+
+Displaying column types/names for database connection of layer <1>:
+INTEGER|cat
+DOUBLE PRECISION|onemap_pro
+DOUBLE PRECISION|PERIMETER
+INTEGER|GEOL250_
+INTEGER|GEOL250_ID
+CHARACTER|GEO_NAME
+DOUBLE PRECISION|SHAPE_area
+DOUBLE PRECISION|SHAPE_len
+</pre></div>
+
+<h3>Basic info in shell script style</h3>
+
+<div class="code"><pre>
+v.info map=geology shell=basic,region,topo
+
+name=geology
+mapset=PERMANENT
+location=nc_spm_08
+database=/home/martin/grassdata
+title=North Carolina geology map (polygon map)
+scale=1:1
+format=native
+creator=helena
+organization=NC OneMap
+source_date=Mon Nov 6 15:48:53 2006
+level=2
+map3d=0
+num_dblinks=1
+projection=Lambert Conformal Conic
+digitization_threshold=0.000000
+comment=
+north=318117.43741634
+south=10875.82723209
+east=930172.31282271
+west=123971.19498978
+top=0.000000
+bottom=0.000000
+nodes=4556
+points=0
+lines=0
+boundaries=3649
+centroids=1832
+areas=1832
+islands=907
+primitives=5481
+</pre></div>
+
+<div class="code"><pre>
+v.info map=geology shell=region
+
+north=318117.43741634
+south=10875.82723209
+east=930172.31282271
+west=123971.19498978
+top=0.000000
+bottom=0.000000
+</pre></div>
+
+<h2>PYTHON</h2>
+
+See <em><a href="http://grass.osgeo.org/programming7/pythonlib.html">Python
+Script Library</a></em> for more info.
+
+<div class="code"><pre>
+import grass.script as grass
+
+grass.vector_columns('geology') # for `v.info -c`
+grass.vector_info_topo('geology') # for `v.info shell=topo`
+</pre></div>
+
+<h2>SEE ALSO</h2>
+
+<em>
+ <a href="r.info.html">r.info</a>,
+ <a href="r3.info.html">r3.info</a>
+</em>
+
<h2>AUTHOR</h2>
Original author CERL<br>
More information about the grass-commit
mailing list