[GRASS-dev] MASK_OVERRIDE

Glynn Clements glynn at gclements.plus.com
Thu Feb 21 03:47:24 EST 2008


Ivan Shmakov wrote:

>  >> Since the code of both the functions I've modified looks painfully
>  >> similar, may I ask for a function to return the (qualified?) name of
>  >> the (existing?) mask?  Which file should I put it in?
> 
>  >> (There're some modules which could use this function as well.)
> 
>  > I would say find_file.c for a generic version, with type-specific
>  > versions in find_cell.c and find_vect.c.
> 
> 	?  Are there a ``generic'' mask facility?

No; I was thinking mainly in terms of this part:

> > 	What are the functions to:
> > 
> > 	* for any valid (possibly qualified) reference for an object
> > 	  (raster, vector, etc.) existing in one of the mapsets
> > 	  comprising the mapset search path, return a corresponding
> > 	  qualified object name;
> 
> I don't think such a function exists at present. It would be easy
> enough to add if there was any use for it; it's just a combination of
> G_find_{cell,vector,<etc>} and G_fully_qualified_name().

"Finding" a map (or other "element") in a mapset has both generic
versions (G_find_file()) and type-specific versions (G_find_cell(),
G_find_vector()), so a G_find_* variant which returns the qualified
name would have generic and type-specific versions.

A function solely to return the qualified name of the current mask
should probably go into mask_info.c.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list