GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73577
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
find_vect.c File Reference

GIS library - Find a vector map. More...

#include <string.h>
#include <grass/config.h>
#include <grass/gis.h>
#include <grass/vect/dig_defines.h>
#include <grass/glocale.h>
Include dependency graph for find_vect.c:

Go to the source code of this file.

Functions

const char * G_find_vector (char *name, const char *mapset)
 Finds a vector map. More...
 
const char * G_find_vector2 (const char *name, const char *mapset)
 Find a vector map (look but don't touch) More...
 

Detailed Description

GIS library - Find a vector map.

(C) 2001-2009 by the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Original author CERL

Definition in file find_vect.c.

Function Documentation

const char* G_find_vector ( char *  name,
const char *  mapset 
)

Finds a vector map.

Searches for a vector map from the mapset search list or in a specified mapset. Returns the mapset name where the vector map was found.

NOTES: If the user specifies a fully qualified vector map which exists, then G_find_vector() modifies name by removing the "@<i>mapset</i>" part.

Rejects all names that begin with "."

Parameters
namevector map name
mapsetmapset name or "" for search path
Returns
pointer to a string with name of mapset where vector map was found
NULL if not found

Definition at line 41 of file find_vect.c.

References G_debug(), G_find_file(), and GV_DIRECTORY.

Referenced by Vect_read_colors().

const char* G_find_vector2 ( const char *  name,
const char *  mapset 
)

Find a vector map (look but don't touch)

The same as G_find_vector() but doesn't remove the "@<i>mapset</i>" qualification from name, if present.

Returns NULL if the map wasn't found, or the mapset the vector was found in if it was.

Parameters
namevector map name
mapsetmapset name where to search
Returns
pointer to buffer containing mapset name
NULL when vector map not found

Definition at line 62 of file find_vect.c.

References G_debug(), G_find_file2(), and GV_DIRECTORY.

Referenced by Gp_load_sites(), Gp_load_sites_thematic(), Gv_load_vect(), Gv_load_vect_thematic(), M_do_remove(), M_do_rename(), Vect__open_old(), Vect_check_input_output_name(), Vect_copy(), and Vect_rename().