Browse Source

gislib: OGR dependency removed

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@38719 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 years ago
parent
commit
2dcd0f6942
3 changed files with 1 additions and 53 deletions
  1. 1 1
      lib/gis/Makefile
  2. 0 1
      lib/gis/find_file.c
  3. 0 51
      lib/gis/find_vect.c

+ 1 - 1
lib/gis/Makefile

@@ -3,7 +3,7 @@ MODULE_TOPDIR = ../..
 LIB_NAME = $(GIS_LIBNAME)
 LIB_NAME = $(GIS_LIBNAME)
 
 
 EXTRA_LIBS = $(DATETIMELIB) $(PTHREADLIBPATH) $(PTHREADLIB) \
 EXTRA_LIBS = $(DATETIMELIB) $(PTHREADLIBPATH) $(PTHREADLIB) \
-	$(INTLLIB) $(MATHLIB) $(ZLIBLIBPATH) $(ZLIB) $(GDALLIBS)
+	$(INTLLIB) $(MATHLIB) $(ZLIBLIBPATH) $(ZLIB)
 EXTRA_INC = $(ZLIBINCPATH) $(PTHREADINCPATH)
 EXTRA_INC = $(ZLIBINCPATH) $(PTHREADINCPATH)
 
 
 DATASRC = ellipse.table datum.table datumtransform.table FIPS.code state27 state83 projections
 DATASRC = ellipse.table datum.table datumtransform.table FIPS.code state27 state83 projections

+ 0 - 1
lib/gis/find_file.c

@@ -16,7 +16,6 @@
 #include <string.h>
 #include <string.h>
 #include <unistd.h>
 #include <unistd.h>
 #include <grass/gis.h>
 #include <grass/gis.h>
-#include <grass/vect/dig_defines.h>
 #include <grass/glocale.h>
 #include <grass/glocale.h>
 
 
 static const char *find_file(
 static const char *find_file(

+ 0 - 51
lib/gis/find_vect.c

@@ -18,12 +18,6 @@
 #include <grass/vect/dig_defines.h>
 #include <grass/vect/dig_defines.h>
 #include <grass/glocale.h>
 #include <grass/glocale.h>
 
 
-#ifdef HAVE_OGR
-#include <ogr_api.h>
-#endif
-
-static const char *find_ogr(const char *, const char *);
-
 /*!
 /*!
   \brief Finds a vector map
   \brief Finds a vector map
  
  
@@ -66,51 +60,6 @@ const char *G_find_vector(char *name, const char *mapset)
  */
  */
 const char *G_find_vector2(const char *name, const char *mapset)
 const char *G_find_vector2(const char *name, const char *mapset)
 {
 {
-    const char *ogr_mapset;
-
-    /* check OGR mapset first */
-    ogr_mapset = find_ogr(name, mapset);
-    if (ogr_mapset)
-	return ogr_mapset;
-    
     return G_find_file2(GV_DIRECTORY, name, mapset);
     return G_find_file2(GV_DIRECTORY, name, mapset);
 }
 }
 
 
-const char *find_ogr(const char *name, const char *mapset)
-{
-    const char *pname, *pmapset;
-    char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
-    
-    if(G_name_is_fully_qualified(name, xname, xmapset)) {
-	pname = xname;
-	pmapset = xmapset;
-    }
-    else {
-	pname = name;
-	pmapset = mapset;
-    }
-    
-    if(pmapset && strcmp(pmapset, "OGR") == 0) {
-	/* unique mapset "OGR", check OGR datasource instead */
-#ifdef HAVE_OGR
-	OGRDataSourceH Ogr_ds;
-	
-	G_debug(1, "OGR mapset detected");
-
-	OGRRegisterAll();
-
-	/* datasource handle */
-	Ogr_ds = OGROpen(pname, FALSE, NULL);
-	if (Ogr_ds == NULL)
-	    G_fatal_error(_("Unable to open OGR data source '%s'"),
-			  pname);
-	
-	return "OGR";
-#else
-	G_fatal_error(_("Unique OGR mapset detected, OGR support is missing"));
-#endif
-    }
-
-    /* OGR mapset not detected */
-    return NULL;
-}