[GRASS-SVN] r56479 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 29 07:45:36 PDT 2013
Author: martinl
Date: 2013-05-29 07:45:36 -0700 (Wed, 29 May 2013)
New Revision: 56479
Modified:
grass/trunk/lib/vector/Vlib/header_finfo.c
Log:
vlib: Vect_get_finfo() returns for native format NULL
warning -> debug (native format detected)
Modified: grass/trunk/lib/vector/Vlib/header_finfo.c
===================================================================
--- grass/trunk/lib/vector/Vlib/header_finfo.c 2013-05-29 14:25:56 UTC (rev 56478)
+++ grass/trunk/lib/vector/Vlib/header_finfo.c 2013-05-29 14:45:36 UTC (rev 56479)
@@ -49,8 +49,8 @@
return Map->fInfo.pg.db_name;
}
- G_warning(_("Native vector format detected for <%s>"),
- Vect_get_full_name(Map));
+ G_debug(1, "Native vector format detected for <%s>",
+ Vect_get_full_name(Map));
return NULL;
}
@@ -89,7 +89,7 @@
Map->fInfo.pg.table_name);
}
else {
- G_warning(_("Native vector format detected for <%s>"),
+ G_debug(1, "Native vector format detected for <%s>",
Vect_get_full_name(Map));
}
@@ -217,17 +217,18 @@
/*!
\brief Get header info for non-native formats
- Prints a warning for native format.
+ \param Map pointer to Map_info structure
- \param Map pointer to Ma_info structure
-
\return pointer to Format_info structure
+ \return NULL for native format
*/
const struct Format_info* Vect_get_finfo(const struct Map_info *Map)
{
- if (Map->format == GV_FORMAT_NATIVE)
- G_warning(_("Native vector format detected for <%s>"),
- Vect_get_full_name(Map));
+ /* do not check Map-format which is native (see
+ * GRASS_VECTOR_EXTERNAL_IMMEDIATE) */
- return &(Map->fInfo);
+ if (Map->fInfo.ogr.driver_name || Map->fInfo.pg.conninfo)
+ return &(Map->fInfo);
+
+ return NULL;
}
More information about the grass-commit
mailing list