[GRASS-SVN] r68128 - in grass/trunk: general/g.proj lib/proj

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Mar 24 06:06:46 PDT 2016


Author: mmetz
Date: 2016-03-24 06:06:46 -0700 (Thu, 24 Mar 2016)
New Revision: 68128

Modified:
   grass/trunk/general/g.proj/input.c
   grass/trunk/lib/proj/Makefile
   grass/trunk/lib/proj/convert.c
Log:
read CSV from GDAL data directory (solve #2456)

Modified: grass/trunk/general/g.proj/input.c
===================================================================
--- grass/trunk/general/g.proj/input.c	2016-03-23 21:29:40 UTC (rev 68127)
+++ grass/trunk/general/g.proj/input.c	2016-03-24 13:06:46 UTC (rev 68128)
@@ -136,7 +136,7 @@
 	G_asprintf(&proj4string, "%s +no_defs", proj4params);
 
     /* Set finder function for locating OGR csv co-ordinate system tables */
-    SetCSVFilenameHook(GPJ_set_csv_loc);
+    /* SetCSVFilenameHook(GPJ_set_csv_loc); */
 
     hSRS = OSRNewSpatialReference(NULL);
     if (OSRImportFromProj4(hSRS, proj4string) != OGRERR_NONE)
@@ -174,7 +174,7 @@
     int ret = 0;
 
     /* Set finder function for locating OGR csv co-ordinate system tables */
-    SetCSVFilenameHook(GPJ_set_csv_loc);
+    /* SetCSVFilenameHook(GPJ_set_csv_loc); */
 
     hSRS = OSRNewSpatialReference(NULL);
     if (OSRImportFromEPSG(hSRS, epsg_num) != OGRERR_NONE)

Modified: grass/trunk/lib/proj/Makefile
===================================================================
--- grass/trunk/lib/proj/Makefile	2016-03-23 21:29:40 UTC (rev 68127)
+++ grass/trunk/lib/proj/Makefile	2016-03-24 13:06:46 UTC (rev 68128)
@@ -16,16 +16,16 @@
 
 NT_TABLES = ntv1_can.dat nzgd2kgrid0005.gsb
 
-CSV_FILES := $(wildcard *.csv)
+#CSV_FILES := $(wildcard *.csv)
 
 PROJ_DIR = $(ETC)/proj
 NAD_DIR  = $(ETC)/proj/nad
-CSV_DIR  = $(ETC)/proj/ogr_csv
+#CSV_DIR  = $(ETC)/proj/ogr_csv
 
 NAD_DSTFILES := $(patsubst %.lla,$(NAD_DIR)/%,$(NAD_TABLES))
 NAD_BINFILES := $(patsubst %.lla,$(OBJDIR)/%,$(NAD_TABLES))
 NT_DSTFILES  := $(patsubst %,$(NAD_DIR)/%,$(NT_TABLES))
-CSV_DSTFILES := $(patsubst %,$(CSV_DIR)/%,$(CSV_FILES))
+#CSV_DSTFILES := $(patsubst %,$(CSV_DIR)/%,$(CSV_FILES))
 
 NAD_SRCDIR = $(ETC)/proj/nad/src
 NAD_SRCFILES := $(patsubst %.lla,$(NAD_SRCDIR)/%.lla,$(NAD_TABLES))
@@ -34,8 +34,10 @@
 PROJ_DSTFILES := $(patsubst %,$(PROJ_DIR)/%,$(PROJ_TABLES))
 
 default: lib $(FTOL_OBJ)
-	$(MAKE) $(NAD_DSTFILES) $(CSV_DSTFILES) $(PROJ_DSTFILES) $(NAD_SRCFILES)
+	$(MAKE) $(NAD_DSTFILES) $(PROJ_DSTFILES) $(NAD_SRCFILES)
 
+#  $(CSV_DSTFILES)
+
 ifdef MINGW
 $(FTOL_OBJ): $(OBJDIR)/ftol.o
 	$(INSTALL) $< $@
@@ -50,8 +52,8 @@
 $(NT_DSTFILES): $(NAD_DIR)/%: % | $(NAD_DIR)
 	$(INSTALL_DATA) $< $@
 
-$(CSV_DSTFILES): $(CSV_DIR)/%.csv: %.csv | $(CSV_DIR)
-	$(INSTALL_DATA) $< $@
+#$(CSV_DSTFILES): $(CSV_DIR)/%.csv: %.csv | $(CSV_DIR)
+#	$(INSTALL_DATA) $< $@
 
 $(NAD_SRCFILES): $(NAD_SRCDIR)/%.lla: %.lla | $(NAD_SRCDIR)
 	$(INSTALL_DATA) $< $@
@@ -65,8 +67,8 @@
 $(NAD_DIR): | $(PROJ_DIR)
 	$(MKDIR) $@
 
-$(CSV_DIR): | $(PROJ_DIR)
-	$(MKDIR) $@
+#$(CSV_DIR): | $(PROJ_DIR)
+#	$(MKDIR) $@
 
 $(NAD_SRCDIR): | $(PROJ_DIR)
 	$(MKDIR) $@

Modified: grass/trunk/lib/proj/convert.c
===================================================================
--- grass/trunk/lib/proj/convert.c	2016-03-23 21:29:40 UTC (rev 68127)
+++ grass/trunk/lib/proj/convert.c	2016-03-24 13:06:46 UTC (rev 68128)
@@ -285,7 +285,7 @@
 	goto default_to_xy;
 
     /* Set finder function for locating OGR csv co-ordinate system tables */
-    SetCSVFilenameHook(GPJ_set_csv_loc);
+    /* SetCSVFilenameHook(GPJ_set_csv_loc); */
 
     /* Hopefully this doesn't do any harm if it wasn't in ESRI format
      * to start with... */
@@ -697,7 +697,7 @@
 	OGRSpatialReferenceH hSRS;
 
 	/* Set finder function for locating OGR csv co-ordinate system tables */
-	SetCSVFilenameHook(GPJ_set_csv_loc);
+	/* SetCSVFilenameHook(GPJ_set_csv_loc); */
 
 	hSRS = OSRNewSpatialReference(wkt);
 	retval =



More information about the grass-commit mailing list