Pārlūkot izejas kodu

vlib/ogr|pg: remove unused function
dox cosmetics


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55694 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 12 gadi atpakaļ
vecāks
revīzija
bbbd600dd5
2 mainītis faili ar 13 papildinājumiem un 38 dzēšanām
  1. 2 32
      lib/vector/Vlib/open_ogr.c
  2. 11 6
      lib/vector/Vlib/open_pg.c

+ 2 - 32
lib/vector/Vlib/open_ogr.c

@@ -26,8 +26,6 @@
 
 #ifdef HAVE_OGR
 #include <ogr_api.h>
-
-static int sqltype_to_ogrtype(int);
 #endif
 
 /*!
@@ -161,7 +159,8 @@ int V2_open_old_ogr(struct Map_info *Map)
 /*!
    \brief Prepare OGR datasource for creating new OGR layer (level 1)
 
-   New OGR layer is created by Vect__open_new_ogr().
+   New OGR layer is created when writing features by
+   Vect_wrile_line().
    
    \param[out] Map pointer to Map_info structure
    \param name name of OGR layer to create
@@ -317,32 +316,3 @@ int Vect_open_fidx(struct Map_info *Map, struct Format_info_offset *offset)
 
     return 0;
 }
-
-#ifdef HAVE_OGR
-int sqltype_to_ogrtype(int sqltype)
-{
-    int ctype, ogrtype;
-
-    ctype = db_sqltype_to_Ctype(sqltype);
-    
-    switch(ctype) {
-    case DB_C_TYPE_INT:
-	ogrtype = OFTInteger;
-	break;
-    case DB_C_TYPE_DOUBLE:
-	ogrtype = OFTReal;
-	break;
-    case DB_C_TYPE_STRING:
-	ogrtype = OFTString;
-	break;
-    case DB_C_TYPE_DATETIME:
-	ogrtype = OFTString;
-	break;
-    default:
-	ogrtype = OFTString;
-	break;
-    }
-    
-    return ogrtype;
-}
-#endif

+ 11 - 6
lib/vector/Vlib/open_pg.c

@@ -5,7 +5,7 @@
 
    Higher level functions for reading/writing/manipulating vectors.
 
-   (C) 2011-2012 by the GRASS Development Team
+   (C) 2011-2013 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.
@@ -48,9 +48,8 @@ static void notice_processor(void *, const char *);
 #endif
 
 /*!
-   \brief Open vector map - PostGIS feature table (level 1 - without topology)
-
-   \todo Check database instead of geometry_columns
+   \brief Open vector map - PostGIS feature table on non-topological
+   level
 
    \param[in,out] Map pointer to Map_info structure
    \param update TRUE for write mode, otherwise read-only
@@ -144,8 +143,13 @@ int V1_open_old_pg(struct Map_info *Map, int update)
 }
 
 /*!
-   \brief Open vector map - PostGIS feature table (level 2 - feature index)
+   \brief Open vector map - PostGIS feature table on topological level
 
+   Simple feature access:
+    - open feature index file
+   PostGIS Topology:
+    - check if topological schema exists
+   
    \param[in,out] Map pointer to Map_info structure
 
    \return 0 success
@@ -199,7 +203,8 @@ int V2_open_old_pg(struct Map_info *Map)
    \brief Prepare PostGIS database for creating new feature table
    (level 1)
 
-   \todo To implement
+   New PostGIS table is created when writing features by
+   Vect_wrile_line().
 
    \param[out] Map pointer to Map_info structure
    \param name name of PostGIS feature table to create