[GRASS-SVN] r38719 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Aug 14 06:21:51 EDT 2009
Author: martinl
Date: 2009-08-14 06:21:50 -0400 (Fri, 14 Aug 2009)
New Revision: 38719
Modified:
grass/trunk/lib/gis/Makefile
grass/trunk/lib/gis/find_file.c
grass/trunk/lib/gis/find_vect.c
Log:
gislib: OGR dependency removed
Modified: grass/trunk/lib/gis/Makefile
===================================================================
--- grass/trunk/lib/gis/Makefile 2009-08-14 10:14:21 UTC (rev 38718)
+++ grass/trunk/lib/gis/Makefile 2009-08-14 10:21:50 UTC (rev 38719)
@@ -3,7 +3,7 @@
LIB_NAME = $(GIS_LIBNAME)
EXTRA_LIBS = $(DATETIMELIB) $(PTHREADLIBPATH) $(PTHREADLIB) \
- $(INTLLIB) $(MATHLIB) $(ZLIBLIBPATH) $(ZLIB) $(GDALLIBS)
+ $(INTLLIB) $(MATHLIB) $(ZLIBLIBPATH) $(ZLIB)
EXTRA_INC = $(ZLIBINCPATH) $(PTHREADINCPATH)
DATASRC = ellipse.table datum.table datumtransform.table FIPS.code state27 state83 projections
Modified: grass/trunk/lib/gis/find_file.c
===================================================================
--- grass/trunk/lib/gis/find_file.c 2009-08-14 10:14:21 UTC (rev 38718)
+++ grass/trunk/lib/gis/find_file.c 2009-08-14 10:21:50 UTC (rev 38719)
@@ -16,7 +16,6 @@
#include <string.h>
#include <unistd.h>
#include <grass/gis.h>
-#include <grass/vect/dig_defines.h>
#include <grass/glocale.h>
static const char *find_file(
Modified: grass/trunk/lib/gis/find_vect.c
===================================================================
--- grass/trunk/lib/gis/find_vect.c 2009-08-14 10:14:21 UTC (rev 38718)
+++ grass/trunk/lib/gis/find_vect.c 2009-08-14 10:21:50 UTC (rev 38719)
@@ -18,12 +18,6 @@
#include <grass/vect/dig_defines.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
@@ -66,51 +60,6 @@
*/
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);
}
-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;
-}
More information about the grass-commit
mailing list