[GRASS-SVN] r57446 - in grass/trunk: include/defs lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 11 12:16:01 PDT 2013
Author: martinl
Date: 2013-08-11 12:16:01 -0700 (Sun, 11 Aug 2013)
New Revision: 57446
Modified:
grass/trunk/include/defs/vector.h
grass/trunk/lib/vector/Vlib/open.c
Log:
vlib: add Vect_open_tmp_old/update
Modified: grass/trunk/include/defs/vector.h
===================================================================
--- grass/trunk/include/defs/vector.h 2013-08-11 18:27:36 UTC (rev 57445)
+++ grass/trunk/include/defs/vector.h 2013-08-11 19:16:01 UTC (rev 57446)
@@ -220,12 +220,14 @@
int Vect_legal_filename(const char *);
int Vect_set_open_level(int);
int Vect_open_old(struct Map_info *, const char *, const char *);
+int Vect_open_tmp_old(struct Map_info *, const char *, const char *);
int Vect_open_old2(struct Map_info *, const char *, const char *, const char *);
int Vect_open_old_head(struct Map_info *, const char *, const char *);
int Vect_open_old_head2(struct Map_info *, const char *, const char *, const char *);
int Vect_open_new(struct Map_info *, const char *, int);
int Vect_open_tmp_new(struct Map_info *, const char *, int);
int Vect_open_update(struct Map_info *, const char *, const char *);
+int Vect_open_tmp_update(struct Map_info *, const char *, const char *);
int Vect_open_update2(struct Map_info *, const char *, const char *, const char *);
int Vect_open_update_head(struct Map_info *, const char *, const char *);
int Vect_copy_head_data(const struct Map_info *, struct Map_info *);
Modified: grass/trunk/lib/vector/Vlib/open.c
===================================================================
--- grass/trunk/lib/vector/Vlib/open.c 2013-08-11 18:27:36 UTC (rev 57445)
+++ grass/trunk/lib/vector/Vlib/open.c 2013-08-11 19:16:01 UTC (rev 57446)
@@ -559,6 +559,29 @@
}
/*!
+ \brief Open existing temporary vector map for reading
+
+ Temporary vector maps are stored in the current mapset (directory
+ <tt>.tmp/<hostname>/vector</tt>).
+
+ Calls G_fatal_error() on failure.
+
+ \todo Create new vector map if doesn't exist.
+
+ \param[out] Map pointer to Map_info structure
+ \param name name of vector map to open
+ \param mapset mapset name ("" for search path)
+
+ \return 1 open on level 1 (without topology)
+ \return 2 open on level 2 (with topology)
+ \return -1 on error
+*/
+int Vect_open_tmp_old(struct Map_info *Map, const char *name, const char *mapset)
+{
+ return Vect__open_old(Map, name, mapset, NULL, FALSE, FALSE, TRUE);
+}
+
+/*!
\brief Open existing vector map for reading
Calls G_fatal_error() on failure.
@@ -603,6 +626,32 @@
}
/*!
+ \brief Open existing temporary vector map for reading/writing
+
+ Temporary vector maps are stored in the current mapset (directory
+ <tt>.tmp/<hostname>/vector</tt>).
+
+ By default list of updated features is not maintained, see
+ Vect_set_updated() for details.
+
+ Calls G_fatal_error() on failure.
+
+ \todo Create new vector map if doesn't exist.
+
+ \param[out] Map pointer to Map_info structure
+ \param name name of vector map to update
+ \param mapset mapset name
+
+ \return 1 open on level 1 (without topology)
+ \return 2 open on level 2 (with topology)
+ \return -1 on error
+*/
+int Vect_open_tmp_update(struct Map_info *Map, const char *name, const char *mapset)
+{
+ return Vect__open_old(Map, name, mapset, NULL, TRUE, FALSE, TRUE);
+}
+
+/*!
\brief Open existing vector map for reading/writing
By default list of updated features is not maintained, see
More information about the grass-commit
mailing list