[GRASS-dev] New v.digit

Michael Barton michael.barton at asu.edu
Sun Feb 25 01:07:39 EST 2007


Glynn,

Do you mind if I change the display and digitizing controls window titles to
"Digitizing $map_name@$map_mapset" (from "v.digit - $map_name@$map_mapset".

This is a bit more descriptive, especially when run from the GIS Manager
rather than from the command line.

"Digitizing controls for $map_name@$map_mapset" might be even better for the
toolbox window, but I'm afraid that title would be too long for some maps.

Michael


On 2/24/07 2:59 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Michael Barton wrote:
> 
>>> A question: 
>>> What's the idea of the "-n" flag? I could not find out the last
>>> years :-) Can we disable it (in the common "deprecated" way)?
>> 
>> AFAICT, we still need the -n for situations where v.digit is run with the
>> name of a map that does not yet exist. Using the -n flag will create a new
>> vector map with the specified name and let you start digitizing this map.
> 
> The code in question is:
> 
>     /* Open map */
>     mapset = G_find_vector2 (map_opt->answer, G_mapset());
>     if ( mapset == NULL ) {
>        if ( new_f->answer ) {
>   G_message(_("New empty map created."));
>   Vect_open_new (&Map, map_opt->answer, 0 );
>   Vect_build ( &Map, NULL );
>   Vect_close (&Map);
>   Vect_open_update (&Map, map_opt->answer, G_mapset());
>        } else {
>   G_message(_("Map does not exist. Add flag -n to create a new map."));
>   exit(EXIT_FAILURE);
>        }
>     } else {
> Vect_set_open_level(2);
> Vect_open_update (&Map, map_opt->answer, mapset);
>     }
> 
> The -n flag is only checked if the map doesn't already exist. In that
> case, it could just skip the -n check and create the map
> automatically.
> 
> The only issue is whether there is a reason not to.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list